/* --- IMPORTS ET VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Poppins:wght@300;400;600&display=swap');

:root {
    --accent: #e74c3c; 
    --accent-hover: #c0392b; 
    --noir: #0a0a0a;
    --argent-doux: #e0e0e0; 
}

/* --- BASE --- */
body { 
    font-family: 'Poppins', sans-serif; 
    overflow-x: hidden; 
    background-color: #fff; 
    margin: 0;
}

/* --- NAVIGATION --- */
.navbar {
    background-color: var(--noir) !important;
    padding: 0.5rem 1rem !important;
    border-bottom: 2px solid var(--accent); 
    z-index: 1050;
    min-height: 80px;
}

.logo-header {
    height: auto;
    max-height: 85px; 
    width: auto;
    filter: invert(1) brightness(2);
    object-fit: contain;
    transition: all 0.3s ease;
}

.nav-link {
    font-weight: 700;
    color: var(--argent-doux) !important;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.nav-link:hover { color: var(--accent) !important; }

/* --- HERO SECTION --- */
.hero-home {
    position: relative;
    z-index: 1;
    min-height: 85vh; 
    padding: 5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('../static/fond_prius.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: white;
    text-align: center;
}

.hero-home h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(2rem, 5vw, 4rem);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
}

/* --- SECTION CATALOGUE --- */
#catalogue {
    position: relative;
    z-index: 2;
    background-color: #f8f9fa;
    padding: 5rem 0;
    box-shadow: 0 -15px 30px rgba(0,0,0,0.15);
    margin-top: 0;
}

/* --- BOUTONS --- */
.btn-warning, .btn-warning:active {
    background-color: var(--accent) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 800 !important;
    padding: 0.8rem 2.2rem !important;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    border-radius: 50px !important;
}

.btn-warning:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

/* --- CARTES DE STOCK --- */
.card-voiture { 
    border: none !important; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important; 
    border-radius: 12px !important; 
    overflow: hidden; 
    height: 100%; 
    position: relative; 
    transition: transform 0.3s ease;
}

.card-voiture:hover { transform: translateY(-5px); }

.img-container { 
    aspect-ratio: 16 / 9; 
    overflow: hidden; 
    position: relative; 
}
.img-container img { width: 100%; height: 100%; object-fit: cover; }

/* --- STYLE DU PRIX --- */
.prix-catalogue {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.vendu-banner {
    position: absolute;
    top: 1.2rem;
    left: -2.8rem;
    width: 10rem;
    background-color: var(--accent);
    color: white;
    font-weight: 900;
    transform: rotate(-45deg);
    text-align: center;
    z-index: 10;
    font-size: 0.8rem;
}

/* --- CARROUSEL DÉTAILS (HAUTEUR MAXIMISÉE) --- */
.carousel-inner {
    /* Passage au format 4/3 pour une hauteur bien plus importante */
    aspect-ratio: 4 / 3 !important;
    background-color: #000; 
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.carousel-item img {
    width: 100% !important;
    height: 100% !important;
    /* On garde contain pour ne jamais couper la carrosserie */
    object-fit: contain !important; 
}

/* --- FOOTER --- */
footer { 
    background: var(--noir) !important; 
    border-top: 3px solid var(--accent) !important; 
    padding: 4rem 0 2rem 0 !important;
    color: white !important;
    position: relative;
    z-index: 10;
}

footer h5 {
    color: white !important;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

footer p, footer a, footer span, footer small {
    color: var(--argent-doux) !important; 
    text-decoration: none !important;
}

footer a:hover { color: var(--accent) !important; }
footer i { color: var(--accent) !important; margin-right: 8px; }

.logo-footer { 
    height: 5.5rem; 
    filter: invert(1) brightness(2);
    opacity: 0.9;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* --- RESPONSIVE --- */
@media (min-width: 992px) {
    .carousel-inner {
        /* On autorise jusqu'à 80% de la hauteur de l'écran sur PC */
        max-height: 80vh; 
    }
}

@media (max-width: 992px) {
    .hero-home { background-attachment: scroll; }
}

@media (max-width: 768px) {
    .logo-header { max-height: 55px !important; }
    .hero-home { min-height: 55vh; padding: 3rem 1rem; }
    .hero-home h1 { font-size: 2rem !important; }
    #catalogue { padding-top: 3rem; }
    footer { text-align: center; }
}