/* =========================================================
   PAT Motors — Components
   Boutons, Tags, Cards, Badges
   ========================================================= */

/* --- Bouton Primaire --- */
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--rouge);
  color: var(--blanc);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.btn-primary:hover {
  background: var(--rouge-sombre);
  transform: translateY(-2px);
  color: var(--blanc);
}

/* --- Bouton Fantôme --- */
.btn-ghost {
  display: inline-block;
  padding: 13px 36px;
  background: transparent;
  color: var(--blanc);
  border: 1px solid rgba(255,255,255,0.25);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.btn-ghost:hover {
  border-color: var(--rouge);
  color: var(--rouge);
}

/* --- Section Tag --- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--rouge);
  margin-bottom: 16px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--rouge);
}

/* --- Séparateur Or --- */
.divider-or {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--or-sombre), var(--or-clair), var(--or-sombre));
  margin: 20px 0;
}

/* --- Section Title --- */
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, var(--text-3xl)); /* fluid: 24px → 48px */
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-title em {
  font-style: italic;
  color: var(--rouge);
}

.section--light .section-title,
.section--creme .section-title {
  color: var(--noir);
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--blanc-60);
  max-width: 520px;
  line-height: 1.75;
}

.section--light .section-subtitle,
.section--creme .section-subtitle {
  color: var(--gris-texte);
}

/* --- Card Véhicule --- */
.vehicle-card {
  position: relative;
  background: var(--gris-fonce);
  overflow: hidden;
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease, border-color 0.25s;
  border: 1px solid transparent;
  cursor: pointer;
}

.vehicle-card:hover {
  border-color: var(--rouge);
  transform: scale(1.01);
}

.vehicle-card__image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.vehicle-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: saturate(0.85);
}

.vehicle-card:hover .vehicle-card__image img {
  transform: scale(1.04);
}

.vehicle-card__image::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(8,8,8,0.9), transparent);
  pointer-events: none;
}

.vehicle-card__badge-brand {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--rouge);
  color: var(--blanc);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  padding: 4px 10px;
  z-index: 2;
}

.vehicle-card__badge-status {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--or);
  color: var(--noir);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  z-index: 2;
}

.vehicle-card__body {
  padding: 20px;
}

.vehicle-card__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.125rem); /* min 1rem sur mobile */
  font-weight: 300;
  color: var(--blanc);
  margin-bottom: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vehicle-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.vehicle-card__spec-pill {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blanc-60);
  background: rgba(255,255,255,0.07);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.vehicle-card__desc {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.vehicle-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.vehicle-card__link {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--rouge);
  transition: color 0.2s;
}

.vehicle-card__link:hover { color: var(--rouge-hover); }

.vehicle-card__whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid rgba(37,211,102,0.3);
  border-radius: 50%;
  transition: background 0.2s, border-color 0.2s;
}

.vehicle-card__whatsapp:hover {
  background: rgba(37,211,102,0.15);
  border-color: #25d366;
}

.vehicle-card__whatsapp svg {
  width: 16px; height: 16px;
  fill: #25d366;
}

/* --- WhatsApp Flottant --- */
.whatsapp-float {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 56px; height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  animation: waPulse 3s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.6);
}

.whatsapp-float svg {
  width: 28px; height: 28px;
  fill: #fff;
}

.whatsapp-float__tooltip {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 50%;
  transform: translateY(50%);
  background: var(--charbon);
  color: var(--blanc);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
}

@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50%       { box-shadow: 0 4px 32px rgba(37,211,102,0.7); }
}

/* --- Badges Généraux --- */
.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
}

.badge--rouge  { background: var(--rouge);  color: var(--blanc); }
.badge--or     { background: var(--or);     color: var(--noir);  }
.badge--charbon { background: var(--charbon); color: var(--blanc); }

/* --- Pills de filtres --- */
.filter-pill {
  display: inline-block;
  padding: 8px 18px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--blanc-60);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--rouge);
  border-color: var(--rouge);
  color: var(--blanc);
}

/* --- Loader AJAX --- */
.ajax-loader {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 40px;
}

.ajax-loader span {
  width: 8px; height: 8px;
  background: var(--rouge);
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}

.ajax-loader span:nth-child(2) { animation-delay: 0.2s; }
.ajax-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40%            { transform: scale(1.2); opacity: 1; }
}
