/* =============================================================
   AutoPrestige – Custom CSS
   ============================================================= */

/* ---- Catalogue : filtres collants (desktop uniquement) ---- */
@media (min-width: 992px) {
  .filters-sidebar {
    position: sticky;
    top: 88px;
    align-self: flex-start;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
  }
}

/* ---- Fonts & Base ---- */
:root {
  --ap-red:      #e94560;
  --ap-red-rgb:  233,69,96;
  --ap-dark:     #1a1a2e;
  --ap-mid:      #16213e;
  --ap-light:    #f8f9fa;
  --ap-border:   #e9ecef;
  --ap-radius:   .75rem;
  --ap-shadow:   0 2px 12px rgba(0,0,0,.08);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #2d3142;
  background: #f8f9fa;
}

/* ---- Buttons ---- */
.btn-danger   { background: var(--ap-red);   border-color: var(--ap-red); }
.btn-danger:hover { background: #c62a47; border-color: #c62a47; }
.btn-white    { background: #fff; color: var(--ap-red); border: 1px solid rgba(255,255,255,.3); }
.btn-white:hover { background: rgba(255,255,255,.9); }
.btn-outline-white { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---- Navbar ---- */
.navbar-dark .navbar-brand { font-size: 1.1rem; letter-spacing: .03em; }
.navbar-dark .nav-link      { font-size: .9rem; font-weight: 500; padding: .5rem .9rem; border-radius: .4rem; }
.navbar-dark .nav-link.active { background: rgba(255,255,255,.12); color: #fff !important; }
.navbar-dark .nav-link:hover  { background: rgba(255,255,255,.08); }

/* ---- Hero Section ---- */
.hero-section {
  position: relative;
  overflow: hidden;
}

/* Canvas particles */
#heroCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Animated gradient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  will-change: transform;
  animation: floatOrb var(--dur, 14s) ease-in-out infinite alternate;
}
.hero-orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, #e94560 0%, transparent 70%); opacity:.35; top: -140px; left: -80px;  --dur: 16s; }
.hero-orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, #4f46e5 0%, transparent 70%); opacity:.28; top: 20%;   right: -60px; --dur: 20s; animation-direction: alternate-reverse; }
.hero-orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, #06b6d4 0%, transparent 70%); opacity:.22; bottom: -40px; left: 40%; --dur: 13s; }

@keyframes floatOrb {
  0%   { transform: translate(0,   0)    scale(1);    }
  33%  { transform: translate(50px,-40px) scale(1.08); }
  66%  { transform: translate(-30px,25px) scale(.94);  }
  100% { transform: translate(35px, 50px) scale(1.05); }
}

/* Dot grid overlay */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,.08)'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
  z-index: 0;
}

/* ---- Hero animated car (background) ---- */
.hero-car-bg {
  position: absolute;
  right: -60px;
  bottom: -10px;
  width: 48%;
  max-width: 580px;
  height: auto;
  pointer-events: none;
  z-index: 0;
  animation: carFloat 5s ease-in-out infinite;
}

.hero-wheel {
  animation: wheelSpin 3s linear infinite;
}

@keyframes carFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes wheelSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---- Vehicle Cards ---- */
.vehicle-card {
  transition: transform .25s ease, box-shadow .25s ease;
  border-radius: var(--ap-radius) !important;
}
.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
}
.vehicle-card:hover .card-overlay {
  opacity: 1 !important;
  transition: opacity .2s;
}
.card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
  transition: opacity .2s;
}

/* ---- Promo band (texte unique qui traverse la bande) ---- */
.promo-band {
  position: relative;
  overflow: hidden;
  height: 2rem;
}

.promo-band-text {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  white-space: nowrap;
  animation: promoScroll 24s linear infinite;
}

@keyframes promoScroll {
  from { left: 100%; }
  to   { left: -100%; }
}

/* ---- Gallery ---- */
.thumb-img {
  transition: opacity .15s, border-color .15s;
  cursor: pointer;
}
.thumb-img:hover { opacity: .85; border-color: var(--ap-red) !important; }

/* ---- Stats on vehicle detail ---- */
.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #f3f4f6;
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .82rem;
  font-weight: 500;
}

/* ---- Cookie banner ---- */
.cookie-banner {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--ap-radius);
  padding: 1rem 1.5rem;
  margin-top: 1.5rem;
}

/* ---- CTA section ---- */
.cta-band .btn-white {
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

/* ---- Forms ---- */
.form-control:focus, .form-select:focus {
  border-color: var(--ap-red);
  box-shadow: 0 0 0 .2rem rgba(var(--ap-red-rgb),.15);
}

/* ---- Prose / Static pages ---- */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin-top: 2rem; font-weight: 700; }
.prose h1:first-child, .prose h2:first-child, .prose h3:first-child,
.prose h4:first-child, .prose h5:first-child, .prose h6:first-child { margin-top: 0; }
.prose p, .prose li { line-height: 1.8; color: #444; }
.prose ul, .prose ol { color: #444; }
.prose a { color: var(--ap-red); font-weight: 600; text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose hr { margin: 1.5rem 0; opacity: .1; }

/* ---- Admin – stat card hover ---- */
.stat-card:hover { transform: translateY(-2px); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ---- Timeline (order history) ---- */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ap-border);
}

/* ---- Responsive tweaks ---- */
@media (max-width: 576px) {
  .hero-section { min-height: 100vh !important; }
  .display-4 { font-size: 2rem; }
}

/* ---- Bootstrap dashed border utility ---- */
.border-dashed {
  border-style: dashed !important;
}

/* ---- Min-vh-75 ---- */
.min-vh-75 {
  min-height: 75vh;
}

/* ---- Tracking wide ---- */
.tracking-wider {
  letter-spacing: .08em;
}

/* ---- Sidebar bottom fixed ---- */
.sidebar { display: flex; flex-direction: column; }
.sidebar > div:last-child { margin-top: auto !important; }

/* ---- Smooth page transitions ---- */
main { animation: fadeIn .25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
