/* ==========================================================================
   assets/css/style.css - Fichier de Style Principal
   Garage Renault Corbie - Occasions & Atelier
   ========================================================================== */

/* 1. VARIABLES & RESET (Les fondations de la charte graphique) */
:root {
    /* Couleurs principales (Renault Yellow, Noir, Blanc, Gris) */
    --primary-color: #FFCC00; /* Jaune Renault puissant et rassurant */
    --secondary-color: #111111; /* Noir élégant pour le texte et nav */
    --background-color: #FFFFFF; /* Blanc pour la clarté */
    --light-gray: #F4F4F4; /* Gris très léger pour les fonds de section */
    
    /* Couleurs d'accentuation (Appels à l'action précis) */
    --accent-color: #EF4444; /* Rouge vif pour le téléphone 'Atelier' */
    --success-color: #22C55E; /* Vert pour le badge de prix/garantie */
    
    /* Typographie */
    --font-headings: 'Montserrat', sans-serif; /* Titres modernes, gras */
    --font-body: 'Open Sans', sans-serif; /* Corps de texte très lisible */
    
    /* Spacings (Généreux pour l'aspect aéré) */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Bordures & Ombres (Finitions subtiles) */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    
    /* Vitesse de transition (Pour la fluidité) */
    --transition-speed: 0.3s;
}

/* Reset de base pour une base propre */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth; /* Défilement fluide entre les sections */
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-headings);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

ul {
    list-style: none;
}

/* ==========================================================================
   2. BOUTONS & CLASSES UTILITAIRES (Des actions claires)
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.section-title p {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* Bouton Principal (Noir brillant) */
.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--background-color);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Bouton Secondaire (Jaune Renault, très visible) */
.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    filter: brightness(110%);
}

/* Bouton Contour (Discret mais clair) */
.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--background-color);
}

/* ==========================================================================
   3. BARRE DE NAVIGATION (Sleek, aérée, professionnelle)
   ========================================================================== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-xl);
    background-color: var(--secondary-color); /* Fond noir pour la nav */
    color: var(--background-color);
    position: fixed; /* Reste en haut au scroll */
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

/* "RENAULT" en jaune, le reste en blanc */
.logo span {
    color: var(--primary-color);
    margin-left: 5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md); /* Espace généreux entre les liens */
}

.nav-links li a {
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Bouton Connexion spécial dans la nav */
.btn-login {
    font-size: 0.8rem;
    color: var(--secondary-color) !important;
    background-color: var(--background-color);
    padding: 6px 15px;
    border-radius: 20px;
}

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

/* ==========================================================================
   4. SECTIONS PRINCIPALES (Exemples spécifiques à l'accueil)
   ========================================================================== */
main {
    margin-top: 80px; /* Espace pour le menu fixed */
}

/* Hero Banner (Photo de garage + Accroche) */
.hero-banner {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8)), 
                url('../img/hero-garage.jpg') no-repeat center center/cover;
    height: 90vh; /* Presque toute la hauteur de l'écran */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--background-color);
    padding: var(--spacing-lg);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto var(--spacing-md) auto;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

/* Section "Derniers Arrivages" */
.latest-cars {
    padding: var(--spacing-xl) var(--spacing-sm);
    background-color: var(--light-gray);
}

/* Grille des Véhicules (Aérée et moderne) */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* Carte Véhicule Unique ( card-vehicule.php ) */
.card-auto {
    background-color: var(--background-color);
    border-radius: var(--border-radius-md);
    overflow: hidden; /* Pour les bords arrondis */
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-speed);
}

.card-auto:hover {
    box-shadow: var(--shadow-md);
}

.card-image {
    position: relative;
    height: 240px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre proprement sans déformer */
}

/* Badge de Prix Vert fluo */
.badge-prix {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--success-color);
    color: var(--background-color);
    padding: 8px 15px;
    font-weight: 700;
    font-size: 1.2rem;
    border-top-left-radius: var(--border-radius-md);
}

.card-content {
    padding: var(--spacing-sm);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
}

.card-title span {
    font-weight: 400;
    color: #666;
}

/* Liste des Caractéristiques (Icônes + Texte) */
.card-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: var(--spacing-sm);
}

.card-features li {
    font-size: 0.85rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-features li i {
    color: var(--secondary-color);
    width: 15px;
    text-align: center;
}

/* Bouton pleine largeur dans la carte */
.card-content .btn-primary {
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   5. FOOTER (Professionnel, juridique, aéré)
   ========================================================================= */
footer {
    background-color: var(--secondary-color);
    color: var(--background-color);
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-col h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.footer-col p {
    margin-bottom: var(--spacing-xs);
    opacity: 0.8;
}

.footer-col p i {
    color: var(--primary-color);
    margin-right: 10px;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    opacity: 0.8;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--spacing-sm);
    text-align: center;
}

.footer-bottom p {
    opacity: 0.5;
    font-size: 0.8rem;
}

/* ==========================================================================
   6. MEDIA QUERIES (RESPONSIVE)
   ========================================================================= */
/* Tablettes et mobiles (Suppression du menu trop large) */
@media (max-width: 900px) {
    .nav-links {
        display: none; /* Cache le menu pour le remplacer par un hamburger JS plus tard */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Petits Mobiles (Espacements réduits) */
@media (max-width: 600px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
}