﻿/* ========================================
   LAYOUT PRO - Version Optimisée
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 25px;
}

:root {
    --primary-color: #64b22a;
    --secondary-color: #1A1A1A;
    --text-light: #f5f5f5;
    --text-dark: #333;
    --bg-header: #ffffff;
}

/* ===== TOP BAR (Plus compacte) ===== */
.top-bar {
    background-color: var(--secondary-color);
    color: #ccc;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 300;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* ✅ Espace entre les éléments */
    gap: 0;
    width: 100%;
    height: 100%;
}

.top-bar-content .phone {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

.top-bar-content .phone i {
    margin-right: 6px;
    font-size: 11px;
}

.top-bar-content .hours {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    color: #999;
    margin: 0 auto;
    padding: 0;
}

/* ✅ Auth links dans la top-bar uniquement */
.top-bar .auth-links {
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1;
    margin: 0 !important;
    padding: 0;
    color: var(--primary-color);
    font-weight: 500;
}

/* ✅ Style pour les liens et boutons dans auth-links */
.top-bar .auth-links span,
.top-bar .auth-links a,
.top-bar .auth-links button {
    margin: 0 !important;
    padding: 2px 8px !important;
    line-height: 1 !important;
    vertical-align: middle;
}

/* ✅ Reset des styles MudButton dans la top-bar */
.top-bar .auth-links .mud-button-root {
    min-height: auto !important;
    height: auto !important;
    padding: 2px 8px !important;
    line-height: 1 !important;
    margin: 0 !important;
}


/* ===== MAIN NAV (Plus compacte) ===== */
.main-nav {
    background-color: var(--bg-header);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 25px;
    /* ✅ Réduit de 15px → 12px */
}

.logo img.carpro-logo {
    height: 48px;
    /* ✅ Réduit de 50px → 48px */
}

/* ===== SEARCH BAR (Mieux proportionnée) ===== */
.search-bar {
    flex-grow: 1;
    max-width: 550px;
    /* ✅ Réduit de 600px → 550px */
    display: flex;
    border: 2px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 30px;
}

.search-bar input {
    width: 100%;
    padding: 9px 15px;
    /* ✅ Réduit de 10px → 9px */
    border: none;
    font-size: 14px;
    /* ✅ Réduit de 15px → 14px */
    color: var(--text-dark);
}

.search-bar input::placeholder {
    color: #999;
    font-size: 13px;
}

.search-bar button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 9px 18px;
    /* ✅ Réduit de 10px 20px → 9px 18px */
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #4a8a1f;
}

/* ===== USER ACTIONS ===== */
.user-actions {
    display: flex;
    gap: 18px;
    /* ✅ Réduit de 20px → 18px */
}

.nav-icon {
    font-size: 17px;
    /* ✅ Réduit de 18px → 17px */
    color: var(--secondary-color);
    transition: color 0.3s;
    text-decoration: none;
}

.nav-icon:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #e74c3c;
    color: white;
    font-size: 11px;
    /* ✅ Réduit de 12px → 11px */
    font-weight: 600;
    width: 17px;
    /* ✅ Réduit de 18px → 17px */
    height: 17px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== SECOND NAV (Plus compacte) ===== */
.second-nav {
    display: flex;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    justify-content: center;
}

.menu-links {
    display: flex;
    gap: 28px;
    /* ✅ Réduit de 30px → 28px */
    padding: 10px 25px;
    /* ✅ Réduit de 12px → 10px */
}

.menu-links a {
    font-size: 13px;
    /* ✅ Réduit de 14px → 13px */
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 7px;
    /* ✅ Réduit de 8px → 7px */
    padding: 4px 0;
    /* ✅ Réduit de 5px → 4px */
    transition: color 0.3s;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}

.menu-links a:hover,
.menu-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.menu-links a i {
    font-size: 13px;
}

/* ===== BODY ===== */
.main-body {
    flex: 1;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .search-bar {
        max-width: 450px;
    }

    .menu-links {
        gap: 20px;
    }
}

@media (max-width: 960px) {
    .top-bar-content .hours {
        display: none;
    }

    .search-bar {
        display: none;
    }

    .menu-links {
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 15px;
    }

    .menu-links a {
        white-space: nowrap;
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .top-bar {
        font-size: 11px;
        padding: 5px 0;
    }

    .nav-content {
        padding: 10px 15px;
    }

    .logo img.carpro-logo {
        height: 40px;
    }

    .menu-links {
        padding: 8px 15px;
    }
}

/* ===== FOOTER COMPLET ===== */
.main-footer {
    background: #1A1A1A;
    color: #ccc;
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.footer-column i {
    color: var(--primary-color);
    margin-right: 8px;
    width: 16px;
}

.footer-description {
    color: #999;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: #999;
}

@media (max-width: 960px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== BARRE DE RECHERCHE HEADER ===== */
.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-input-header {
    background: white;
}

.search-input-header .mud-input-root {
    border-radius: 8px;
}

/* Masquer sur mobile */
@media (max-width: 960px) {
    .header-search {
        display: none;
    }
}