/*
Theme Name: Auto Rachat BE
Theme URI: https://auto-rachat.be
Author: Vibe Coding
Description: Thème WordPress sur mesure pour marchand automobile belge - rachat de véhicules avec capture de leads
Version: 1.0.0
Text Domain: auto-rachat
*/

/* ===== VARIABLES ===== */
:root {
  --primary: #1a2a4a;
  --accent: #ff6b35;
  --accent-hover: #e55a28;
  --white: #ffffff;
  --light-bg: #f5f7fa;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --success: #28a745;
  --radius: 8px;
  --shadow: 0 2px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 5px 30px rgba(0,0,0,0.15);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}
a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { color: var(--primary); line-height: 1.3; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header {
  background: var(--primary);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-logo {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
}
.site-logo span { color: var(--accent); }

/* Nav */
.main-nav ul { list-style: none; display: flex; gap: 18px; align-items: center; }
.main-nav > ul > li > a { color: var(--white); font-weight: 500; transition: color 0.3s; font-size: 0.9rem; }
.main-nav > ul > li > a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-hover); }

/* Header phone CTA */
.header-phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.1rem;
  animation: cta-glow 1.5s ease-in-out infinite;
  position: relative;
}
.header-phone-cta:hover { background: var(--accent-hover); color: var(--white) !important; transform: scale(1.05); }
.phone-pulse {
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  animation: phone-ring 1s ease-in-out infinite;
}
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255,107,53,0.4); }
  50% { box-shadow: 0 0 20px rgba(255,107,53,0.8), 0 0 40px rgba(255,107,53,0.3); }
}
@keyframes phone-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

/* Dropdown menus */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: ' ▾'; font-size: 0.7em; }
.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 15px;
}
.dropdown {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  min-width: 260px;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 8px 0;
  z-index: 1001;
  flex-direction: column;
  gap: 0;
  border-top: 3px solid var(--accent);
  transition: opacity 0.2s;
}
.has-dropdown:hover > .dropdown { display: flex !important; visibility: visible; opacity: 1; }
.dropdown li { list-style: none; }
.dropdown a {
  display: block;
  padding: 9px 18px;
  color: var(--text) !important;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.dropdown a:hover { background: var(--light-bg); color: var(--accent) !important; padding-left: 22px; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 968px) {
  .nav-toggle { display: block; }
  .main-nav > ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary); padding: 20px; gap: 10px; z-index: 1002; }
  .main-nav.active > ul { display: flex; }
  .main-nav > ul > li > a { font-size: 1rem; }
  .dropdown { position: static !important; background: rgba(255,255,255,0.08); box-shadow: none; min-width: auto; padding: 5px 0 5px 15px; display: none !important; visibility: hidden; opacity: 1; transform: none; left: 0; border-top: none; border-radius: var(--radius); }
  .has-dropdown:hover > .dropdown { display: none !important; visibility: hidden; }
  .has-dropdown.open > .dropdown { display: flex !important; visibility: visible; }
  .dropdown a { color: rgba(255,255,255,0.8) !important; font-size: 0.85rem; padding: 8px 15px; }
  .dropdown a:hover { background: rgba(255,255,255,0.1); padding-left: 20px; }
  .has-dropdown > a::after { content: ' ▸'; }
  .has-dropdown.open > a::after { content: ' ▾'; }
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2a3f6a 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 20px; color: var(--white); }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 0 auto 30px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-align: center;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--white); color: var(--primary); }
.btn-secondary:hover { background: var(--light-bg); color: var(--primary); }
.btn-large { padding: 18px 40px; font-size: 1.1rem; }

/* ===== SECTIONS ===== */
.section { padding: 60px 0; }
.section-alt { background: var(--light-bg); }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 15px; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; font-size: 1.1rem; }

/* ===== HOW IT WORKS (3 steps) ===== */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step-card {
  text-align: center;
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.step-card:hover { transform: translateY(-5px); }
.step-number {
  width: 60px; height: 60px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
  margin: 0 auto 15px;
}
.step-card h3 { margin-bottom: 10px; }
@media (max-width: 768px) { .steps-grid { grid-template-columns: 1fr; } }

/* ===== ADVANTAGES ===== */
.advantages-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.advantage-item {
  display: flex; gap: 15px; padding: 20px;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.advantage-icon { font-size: 2rem; flex-shrink: 0; }
.advantage-item h3 { margin-bottom: 5px; font-size: 1.1rem; }
@media (max-width: 768px) { .advantages-grid { grid-template-columns: 1fr; } }

/* ===== TESTIMONIALS ===== */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.testimonial-card {
  padding: 25px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}
.testimonial-stars { color: #ffc107; margin-bottom: 10px; }
.testimonial-text { font-style: italic; margin-bottom: 15px; }
.testimonial-author { font-weight: 600; color: var(--primary); }
@media (max-width: 768px) { .testimonials-grid { grid-template-columns: 1fr; } }

/* ===== ZONES ===== */
.zones-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.zone-link {
  display: block; padding: 15px; text-align: center;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--primary);
  font-weight: 600; transition: all 0.3s;
}
.zone-link:hover { background: var(--accent); color: var(--white); transform: translateY(-3px); }
@media (max-width: 768px) { .zones-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== LEAD FORM ===== */
.lead-form-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
}
.lead-form-wrapper h2 { text-align: center; margin-bottom: 25px; }
.lead-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.lead-form-grid .full-width { grid-column: 1 / -1; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 5px;
  color: var(--primary); font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.3s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-submit {
  text-align: center; margin-top: 20px;
}
.form-submit .btn { width: 100%; padding: 16px; font-size: 1.1rem; }
.form-message { text-align: center; margin-top: 15px; padding: 10px; border-radius: var(--radius); display: none; }
.form-message.success { display: block; background: #d4edda; color: #155724; }
.form-message.error { display: block; background: #f8d7da; color: #721c24; }
@media (max-width: 768px) { .lead-form-grid { grid-template-columns: 1fr; } .lead-form-wrapper { padding: 25px; } }

/* ===== PAGE WITH SIDEBAR LAYOUT ===== */
.page-with-sidebar { padding: 40px 0; }
.sidebar-layout { display: grid; grid-template-columns: 1fr 350px; gap: 40px; align-items: start; }
.page-main { min-width: 0; }
.page-sidebar { position: relative; }
.sidebar-form-sticky { position: sticky; top: 80px; }
.sidebar-form-sticky .lead-form-wrapper { padding: 25px; box-shadow: var(--shadow-lg); border: 2px solid var(--accent); }
.sidebar-form-sticky .lead-form-grid { grid-template-columns: 1fr; }
.sidebar-form-sticky .lead-form-wrapper h2 { font-size: 1.3rem; }

/* Mobile: form banner at top */
@media (max-width: 968px) {
  .sidebar-layout { grid-template-columns: 1fr; }
  .page-sidebar { order: -1; }
  .sidebar-form-sticky { position: relative; top: 0; }
  .sidebar-form-sticky .lead-form-wrapper { border: 2px solid var(--accent); background: linear-gradient(135deg, #fff 0%, #fff5f0 100%); }
}

/* Mobile CTA floating button */
.mobile-cta-float {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 999;
  background: var(--accent);
  color: var(--white);
  text-align: center;
  padding: 15px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
@media (max-width: 768px) {
  .mobile-cta-float { display: block; }
}

/* ===== PAGE CONTENT ===== */
.page-content {
  padding: 60px 0;
  max-width: 800px;
  margin: 0 auto;
}
.page-content h1 { font-size: 2.2rem; margin-bottom: 20px; }
.page-content h2 { font-size: 1.6rem; margin: 30px 0 15px; }
.page-content h3 { font-size: 1.3rem; margin: 25px 0 10px; }
.page-content p { margin-bottom: 15px; }
.page-content ul, .page-content ol { margin: 15px 0; padding-left: 25px; }
.page-content li { margin-bottom: 8px; }

/* Internal links block */
.silo-links {
  background: var(--light-bg);
  padding: 25px;
  border-radius: var(--radius);
  margin: 30px 0;
}
.silo-links h3 { margin-bottom: 15px; }
.silo-links ul { list-style: none; padding: 0; }
.silo-links li { margin-bottom: 8px; }
.silo-links a { font-weight: 500; }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #ff8f5e 100%);
  color: var(--white);
  padding: 50px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); font-size: 2rem; margin-bottom: 15px; }
.cta-banner p { font-size: 1.1rem; margin-bottom: 25px; opacity: 0.95; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--primary);
  color: var(--white);
  padding: 40px 0 20px;
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 30px; }
.footer-col h3 { color: var(--accent); margin-bottom: 15px; font-size: 1.1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.8); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== BLOG ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.blog-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform 0.3s;
}
.blog-card:hover { transform: translateY(-5px); }
.blog-card-content { padding: 20px; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.blog-card p { color: var(--text-light); font-size: 0.95rem; }
@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr; } }
