:root {
  --ford-blue: #003478;
  --ford-blue-light: #0056b3;
  --white: #ffffff;
  --gray-light: #f8f9fa; /* Adouci pour un rendu plus moderne */
  --gray-medium: #6c757d;
  --silver: #c0c0c0;
  --silver-dark: #a8a8a8;
  --dark-blue: #001f47; /* Centralisation de la couleur du footer */
}

* {
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  color: #333;
  background-color: var(--white);
}

/* ==========================================================================
   Header & Navigation (Top Bar + Navbar)
   ========================================================================== */
header {
  z-index: 1030;
}

/* Surcharge de la couleur principale de Bootstrap par le Bleu Ford */
.text-primary {
  color: var(--silver) !important; /* L'accent dans "DEL AUTO" */
}

.btn-primary {
  background-color: var(--ford-blue) !important;
  border-color: var(--ford-blue) !important;
}

.btn-primary:hover {
  background-color: var(--ford-blue-light) !important;
  border-color: var(--ford-blue-light) !important;
}

.navbar {
  background-color: var(--ford-blue) !important;
  padding: 0.75rem 0;
  border: none !important;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--white) !important;
  letter-spacing: 2px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

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

/* Version modernisée de l'active state */
.nav-link.active {
  color: var(--white) !important;
  position: relative;
}

@media (min-width: 992px) {
  .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--white);
  }
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--white);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: 1.25rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.tracking-wider {
  letter-spacing: 1px;
}

/* ==========================================================================
   Sections & Titres
   ========================================================================== */
.section-title {
  color: var(--ford-blue);
  font-weight: 700;
}

/* ==========================================================================
   Services Section (Cartes)
   ========================================================================== */
.services-section {
  background-color: var(--gray-light);
}

.hover-lift {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 52, 120, 0.12) !important;
}

/* Personnalisation des conteneurs d'icônes */
.style-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(0, 52, 120, 0.08) !important;
  color: var(--ford-blue) !important;
}

/* ==========================================================================
   Occasions Section (Nouvelle)
   ========================================================================== */
.occasions-section .card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.occasions-section .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   Contact Quick Section
   ========================================================================== */
.quick-contact {
  background-color: var(
    --white
  ); /* Changé en blanc pour contrer le formulaire */
}

.quick-contact .bg-light {
  background-color: var(--gray-light) !important;
}

.quick-contact .text-primary {
  color: var(--ford-blue) !important; /* Icônes de contact en bleu */
}

/* Style des inputs du formulaire */
.form-control:focus {
  border-color: var(--ford-blue) !important;
  box-shadow: 0 0 0 0.25rem rgba(0, 52, 120, 0.15) !important;
  background-color: var(--white) !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background-color: var(--dark-blue) !important;
}

footer h5,
footer h6 {
  color: var(--white);
  font-weight: 700;
}

.custom-footer-links a {
  transition: all 0.2s ease;
}

.custom-footer-links a:hover {
  color: var(--white) !important;
  padding-left: 4px; /* Léger effet de glissement au survol */
}

/* ==========================================================================
   Responsive Adaptation
   ========================================================================== */
@media (max-width: 991px) {
  /* Ajustement de la marge supérieure du main sur tablette/mobile */
  main {
    margin-top: 56px !important;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .hero {
    min-height: 65vh !important;
  }
}

/* Intégration Vignettes Galerie Occasions */
#vehicleCarousel + .row .btn {
  opacity: 0.5;
  transition: all 0.2s ease-in-out;
  border: 2px solid transparent !important;
}

#vehicleCarousel + .row .btn.active,
#vehicleCarousel + .row .btn:hover {
  opacity: 1;
  border-color: #003478 !important; /* Bordure bleu Ford au survol/sélection */
  transform: scale(1.02);
}

/* Style pour les champs du formulaire dark de la page détail */
.bg-dark .form-control {
  color: var(--white) !important;
  background-color: rgba(
    255,
    255,
    255,
    0.1
  ) !important; /* Léger blanc transparent au lieu du gris */
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Force la couleur du texte d'aide (placeholder) en blanc semi-transparent */
.bg-dark .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Gestion du focus pour éviter que le fond redevienne blanc ou noir au clic */
.bg-dark .form-control:focus {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: var(--white) !important;
  border-color: var(--ford-blue-light) !important;
  box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25) !important;
}
