/* ============================================
   AUTODRIVE - Feuille de style principale
   Fichier : css/style.css
   Couleurs : bleu foncé #1a2e4a, blanc #ffffff, orange #f97316
   ============================================ */

/* --- Variables CSS --- */
:root {
    --bleu:    #1a2e4a;
    --bleu2:   #0f1d2e;
    --orange:  #f97316;
    --orange2: #ea6c0a;
    --blanc:   #ffffff;
    --gris:    #f4f6f9;
    --gris2:   #e2e8f0;
    --texte:   #334155;
    --radius:  10px;
    --ombre:   0 4px 20px rgba(0,0,0,0.08);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--blanc);
    color: var(--texte);
    line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a  { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange2); }

/* --- NAVBAR --- */
.navbar {
    background: var(--bleu);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}
.navbar .logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--blanc);
    letter-spacing: 1px;
}
.navbar .logo span { color: var(--orange); }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    transition: color 0.2s;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--blanc);
    border-bottom-color: var(--orange);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--blanc); }

/* --- HERO --- */
.hero {
    background: linear-gradient(135deg, var(--bleu2) 0%, var(--bleu) 60%, #24426b 100%);
    padding: 90px 5%;
    text-align: center;
    color: var(--blanc);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.12;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.hero h1 span { color: var(--orange); }
.hero p { font-size: 1.15rem; opacity: 0.85; margin-bottom: 35px; }
.hero-btns { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* --- BOUTONS --- */
.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.btn-primary { background: var(--orange); color: var(--blanc); }
.btn-primary:hover { background: var(--orange2); color: var(--blanc); }
.btn-outline {
    background: transparent;
    color: var(--blanc);
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--blanc); }
.btn-dark { background: var(--bleu); color: var(--blanc); }
.btn-dark:hover { background: var(--bleu2); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; text-align: center; }

/* --- SECTIONS --- */
.section { padding: 70px 5%; }
.section-alt { background: var(--gris); }
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bleu);
    margin-bottom: 10px;
}
.section-title span { color: var(--orange); }
.section-sub {
    text-align: center;
    color: #64748b;
    margin-bottom: 50px;
    font-size: 1.05rem;
}

/* --- STATS ACCUEIL --- */
.stats {
    background: var(--bleu);
    padding: 40px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    text-align: center;
}
.stat-item h3 { font-size: 2.2rem; font-weight: 800; color: var(--orange); }
.stat-item p  { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin-top: 4px; }

/* --- GRILLE VÉHICULES --- */
.vehicules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}
.vehicule-card {
    background: var(--blanc);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--ombre);
    transition: transform 0.2s, box-shadow 0.2s;
}
.vehicule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}
.vehicule-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}
.card-img-placeholder {
    width: 100%; height: 210px;
    background: linear-gradient(135deg, var(--bleu) 0%, #2d4f7a 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
}
.card-body { padding: 18px; }
.card-badge {
    display: inline-block;
    background: var(--orange);
    color: var(--blanc);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--bleu); margin-bottom: 6px; }
.card-desc   { font-size: 0.88rem; color: #64748b; margin-bottom: 14px; }
.card-specs  { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.spec-item   { font-size: 0.8rem; color: #475569; display: flex; align-items: center; gap: 4px; }
.card-prices { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 16px; }
.prix-achat  { font-size: 1.2rem; font-weight: 800; color: var(--bleu); }
.prix-loc    { font-size: 0.95rem; color: var(--orange); font-weight: 600; }
.card-btns   { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- FILTRES --- */
.filtres {
    background: var(--blanc);
    border: 1px solid var(--gris2);
    border-radius: var(--radius);
    padding: 20px 25px;
    margin-bottom: 35px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filtre-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 150px; }
.filtre-group label { font-size: 0.82rem; font-weight: 600; color: var(--bleu); }
.filtre-group select,
.filtre-group input {
    padding: 9px 12px;
    border: 1px solid var(--gris2);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--texte);
    outline: none;
    transition: border-color 0.2s;
}
.filtre-group select:focus,
.filtre-group input:focus { border-color: var(--orange); }

/* --- FORMULAIRES --- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--bleu); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gris2);
    border-radius: 7px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--texte);
    transition: border-color 0.2s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--orange); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* --- MODAL --- */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--blanc);
    border-radius: 12px;
    padding: 35px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute; top: 15px; right: 18px;
    font-size: 1.4rem; cursor: pointer; color: #94a3b8;
    background: none; border: none; line-height: 1;
}
.modal-close:hover { color: var(--texte); }
.modal h2 { font-size: 1.4rem; color: var(--bleu); margin-bottom: 20px; }

/* --- ALERTES --- */
.alert {
    padding: 14px 18px;
    border-radius: 7px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    display: none;
}
.alert.show { display: block; }
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid #22c55e; }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

/* --- AVANTAGES --- */
.avantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    text-align: center;
}
.avantage-item { padding: 30px 20px; }
.avantage-icon { font-size: 2.5rem; margin-bottom: 15px; }
.avantage-item h3 { font-size: 1.1rem; color: var(--bleu); font-weight: 700; margin-bottom: 10px; }
.avantage-item p  { font-size: 0.9rem; color: #64748b; }

/* --- PAGE CONTACT --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}
.contact-info h3 { font-size: 1.4rem; color: var(--bleu); margin-bottom: 20px; }
.contact-detail {
    display: flex; gap: 12px; align-items: flex-start;
    margin-bottom: 18px;
}
.contact-detail-icon { font-size: 1.3rem; margin-top: 2px; }
.contact-detail strong { display: block; color: var(--bleu); margin-bottom: 3px; }
.contact-detail span  { font-size: 0.92rem; color: #64748b; }
.contact-form-box {
    background: var(--blanc);
    border-radius: var(--radius);
    padding: 35px;
    box-shadow: var(--ombre);
}

/* --- FOOTER --- */
footer {
    background: var(--bleu2);
    color: rgba(255,255,255,0.75);
    padding: 50px 5% 25px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 { color: var(--blanc); font-size: 1rem; margin-bottom: 16px; }
.footer-col p  { font-size: 0.88rem; line-height: 1.8; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.65); font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--orange); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* --- LOADING --- */
.loading {
    display: flex; justify-content: center; align-items: center;
    padding: 60px;
}
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--gris2);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--bleu); flex-direction: column; padding: 20px 5%; gap: 15px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }
    .hero h1 { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .filtres { flex-direction: column; }
    .hero-btns { flex-direction: column; align-items: center; }
}

/* WHATSAPP FLOTTANT */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    z-index: 998;
    transition: all 0.25s ease;
}
.whatsapp-float:hover {
    background: #1ebe57;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(37,211,102,0.55);
}

/* FACEBOOK FLOTTANT */
.facebook-float {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: #1877F2;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(24,119,242,0.45);
    z-index: 998;
    transition: all 0.25s ease;
}
.facebook-float:hover {
    background: #0f6ae0;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(24,119,242,0.55);
}

/* TIKTOK FLOTTANT */
.tiktok-float {
    position: fixed;
    bottom: 172px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: #000000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    z-index: 998;
    transition: all 0.25s ease;
}
.tiktok-float:hover {
    background: #1a1a1a;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
}

#page-accueil .hero {
    background-image: url('../images/ed8fe01330348c9541ecdbd32183d4e5.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

#page-achat .hero {
    background-image: url('../images/45680375-salle-d-exposition-pour-voitures-concessionnaire-de-véhicules-montrant-une-nouvelle-voiture.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

#page-location .hero {
    background-image: url('../images/blue-car-q199z8auifcxu1tr.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

#page-contact .hero {
    background-image: url('../images/67a6b30c1bc495e89bded634_Toyota-Logo-Desk.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* --- HERO --- */
.hero {
    padding: 90px 5%;
    text-align: center;
    color: var(--blanc);
    position: relative;
    overflow: hidden;
    background: var(--bleu);
}

/* TÉLÉPHONE FLOTTANT */
.phone-float {
    position: fixed;
    bottom: 244px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: #1a2e4a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(26,46,74,0.45);
    z-index: 998;
    transition: all 0.25s ease;
}

.phone-float:hover {
    background: #0f1d2e;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(26,46,74,0.55);
}