/* Autos France — feuille de style principale (mobile first) */

:root {
  --af-navy: #0B2A4A;
  --af-navy-dark: #081E36;
  --af-accent: #C8102E;
  --af-accent-dark: #A20D25;
  --af-ink: #12181F;
  --af-gray-700: #4B5563;
  --af-gray-500: #6B7280;
  --af-gray-300: #D8DCE2;
  --af-gray-100: #F4F5F7;
  --af-white: #FFFFFF;
  --af-radius: 14px;
  --af-shadow: 0 1px 2px rgba(11,42,74,0.06), 0 8px 24px rgba(11,42,74,0.08);
  --af-max: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--af-ink);
  background: var(--af-gray-100);
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.af-container {
  max-width: var(--af-max);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .af-container { padding: 0 24px; }
}

/* ---------- Logo ---------- */

.af-logo { display: inline-flex; align-items: center; gap: 8px; }
.af-logo-text {
  font-weight: 700;
  letter-spacing: -0.5px;
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}
.af-logo-text span + span { margin-left: 5px; }
@media (min-width: 640px) {
  .af-logo { gap: 10px; }
  .af-logo-text { font-size: 20px; }
  .af-logo-text span + span { margin-left: 6px; }
}

/* ---------- Header ---------- */

.af-header {
  background: var(--af-white);
  border-bottom: 1px solid var(--af-gray-300);
  position: sticky;
  top: 0;
  z-index: 20;
}
.af-header .af-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 10px;
}
.af-nav { display: flex; align-items: center; gap: 14px; }
.af-nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--af-gray-700);
  white-space: nowrap;
}
.af-nav a:hover { color: var(--af-navy); }
.af-nav a.af-nav-cta {
  background: var(--af-navy);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
}
.af-nav a.af-nav-cta:hover { background: var(--af-navy-dark); }
@media (min-width: 640px) {
  .af-header .af-container { height: 76px; }
  .af-nav { gap: 28px; }
  .af-nav a { font-size: 14px; letter-spacing: 0.3px; }
  .af-nav a.af-nav-cta { padding: 10px 18px; }
}

/* ---------- Hero ---------- */

.af-hero {
  background: var(--af-navy);
  color: #fff;
  padding: 32px 0 24px;
}
.af-hero h1 {
  font-size: clamp(24px, 6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
.af-hero p {
  color: rgba(255,255,255,0.72);
  font-size: 15px;
  margin: 0 0 20px;
  max-width: 560px;
}
.af-hero p.af-hero-zone {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin: -12px 0 0;
  max-width: 640px;
}
@media (min-width: 640px) {
  .af-hero { padding: 56px 0 40px; }
  .af-hero p { font-size: 17px; margin: 0 0 28px; }
  .af-hero p.af-hero-zone { font-size: 14px; margin: -20px 0 0; }
}

/* ---------- Filtres ---------- */

.af-filters {
  background: var(--af-white);
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  transform: translateY(16px);
}
.af-field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.af-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--af-gray-500);
}
.af-field select,
.af-field input {
  border: 1px solid var(--af-gray-300);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 16px; /* évite le zoom automatique au focus sur mobile (iOS) */
  color: var(--af-ink);
  background: #fff;
  width: 100%;
}
.af-field select:focus,
.af-field input:focus { outline: 2px solid var(--af-navy); outline-offset: 1px; }
.af-field-range { display: flex; align-items: center; gap: 6px; }
.af-field-range input { width: 0; flex: 1 1 0; }
.af-filters .af-btn,
.af-filters #af-reset { width: 100%; }

@media (min-width: 640px) {
  .af-filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 18px;
    transform: translateY(24px);
  }
  .af-field { width: auto; min-width: 140px; }
  .af-field select,
  .af-field input { font-size: 14px; }
  .af-filters .af-btn,
  .af-filters #af-reset { width: auto; align-self: end; }
}

/* ---------- Grille véhicules ---------- */

.af-main { padding: 32px 0 56px; }
.af-results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 16px;
  color: var(--af-gray-500);
  font-size: 13px;
  gap: 10px;
  flex-wrap: wrap;
}
.af-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
@media (min-width: 640px) {
  .af-main { padding: 56px 0 80px; }
  .af-results-bar { font-size: 14px; margin: 0 0 20px; }
  .af-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
}

.af-card {
  background: #fff;
  border-radius: var(--af-radius);
  overflow: hidden;
  box-shadow: var(--af-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.af-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(11,42,74,0.08), 0 16px 32px rgba(11,42,74,0.12); }
.af-card-photo {
  aspect-ratio: 4 / 3;
  background: var(--af-gray-100) center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
/* Défilement des photos (plusieurs photos par annonce) : une simple bande
   scrollable avec accroche (scroll-snap) — pas de librairie JS, ça reste
   léger et ça fonctionne nativement au doigt sur mobile. */
.af-card-photo-scroll {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.af-card-photo-scroll::-webkit-scrollbar { display: none; }
.af-card-photo-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.af-card-photo-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.af-card-photo .af-noimg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--af-gray-300);
}
.af-card-photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(11,42,74,0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.af-card-photo-prev { left: 8px; }
.af-card-photo-next { right: 8px; }
.af-card-photo-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
  pointer-events: none;
}
.af-card-photo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.65);
  transition: background 0.15s ease, transform 0.15s ease;
}
.af-card-photo-dot.is-active { background: #fff; transform: scale(1.4); }
@media (hover: hover) and (pointer: fine) {
  /* Les flèches ne servent qu'à la souris : sur tactile, le doigt suffit et
     les afficher en permanence gênerait plus qu'autre chose. */
  .af-card-photo-nav {
    display: flex;
    opacity: 0;
    transition: opacity 0.15s ease;
  }
  .af-card-photo:hover .af-card-photo-nav,
  .af-card-photo-nav:focus-visible {
    opacity: 1;
  }
}
.af-card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}

.af-badge {
  background: rgba(11,42,74,0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}
.af-badge.af-badge-vendu { background: var(--af-accent); }
.af-badge.af-badge-reserve { background: #B8860B; }
/* Le badge « Nouveau » garde le fond bleu marine par défaut de .af-badge
   (pas de couleur spécifique ici). */

.af-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.af-card-title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; margin: 0; }
.af-card-meta { font-size: 12px; color: var(--af-gray-500); display: flex; gap: 10px; flex-wrap: wrap; }
.af-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.af-card-meta svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.af-card-price { margin-top: auto; font-size: 19px; font-weight: 700; color: var(--af-accent); }
@media (min-width: 640px) {
  .af-card-badges { top: 12px; left: 12px; gap: 8px; }
  .af-badge { font-size: 11px; padding: 5px 10px; }
  .af-card-body { padding: 16px 18px 18px; gap: 8px; }
  .af-card-title { font-size: 17px; }
  .af-card-meta { font-size: 13px; }
  .af-card-price { font-size: 20px; }
}

.af-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--af-gray-500);
}
.af-empty svg { margin: 0 auto 16px; opacity: 0.35; }

/* ---------- Boutons ---------- */

.af-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px;
  padding: 12px 20px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  min-height: 44px; /* cible tactile confortable */
}
.af-btn-primary { background: var(--af-navy); color: #fff; }
.af-btn-primary:hover { background: var(--af-navy-dark); }
.af-btn-accent { background: var(--af-accent); color: #fff; }
.af-btn-accent:hover { background: var(--af-accent-dark); }
.af-btn-ghost { background: #fff; color: var(--af-navy); border-color: var(--af-gray-300); }
.af-btn-ghost:hover { border-color: var(--af-navy); }
.af-btn-danger { background: #fff; color: var(--af-accent); border-color: #F3C6CC; }
.af-btn-danger:hover { background: #FDF0F1; }
.af-btn-sm { padding: 7px 12px; font-size: 13px; min-height: 0; }
.af-btn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (min-width: 640px) {
  .af-btn { font-size: 14px; padding: 11px 20px; }
}

/* ---------- Fiche véhicule ---------- */

.af-detail { padding: 24px 0 56px; }
.af-breadcrumb { font-size: 13px; color: var(--af-gray-500); margin-bottom: 16px; }
.af-breadcrumb a:hover { color: var(--af-navy); }
.af-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 640px) {
  .af-detail { padding: 40px 0 80px; }
  .af-breadcrumb { margin-bottom: 20px; }
}
@media (min-width: 860px) {
  .af-detail-grid { grid-template-columns: 1.3fr 1fr; gap: 40px; }
}

.af-gallery-main {
  aspect-ratio: 4 / 3;
  background: var(--af-gray-100);
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
  margin-bottom: 12px;
  overflow: hidden;
}
.af-gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.af-gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.af-gallery-thumbs button {
  width: 64px; height: 48px;
  border-radius: 8px;
  border: 2px solid transparent;
  background-size: cover; background-position: center;
  cursor: pointer;
  padding: 0;
}
.af-gallery-thumbs button.active { border-color: var(--af-navy); }
@media (min-width: 640px) {
  .af-gallery-thumbs { gap: 10px; }
  .af-gallery-thumbs button { width: 76px; height: 58px; }
}

.af-detail-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; margin-bottom: 6px; }
.af-detail-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin: 0; }
.af-detail-actions { display: flex; align-items: center; gap: 8px; }
.af-print-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--af-navy);
  border: 1px solid var(--af-gray-300);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.af-print-btn:hover { border-color: var(--af-navy); }
.af-print-btn svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.af-detail-price { font-size: 24px; font-weight: 700; color: var(--af-accent); white-space: nowrap; }
@media (min-width: 640px) {
  .af-detail-header h1 { font-size: 30px; }
  .af-detail-price { font-size: 30px; }
}

.af-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
  background: #fff;
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
  padding: 16px;
}
.af-spec { display: flex; flex-direction: column; gap: 3px; }
.af-spec dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--af-gray-500); }
.af-spec dd { margin: 0; font-weight: 600; font-size: 14px; }
@media (min-width: 640px) {
  .af-spec-grid { margin: 24px 0; padding: 20px; }
  .af-spec dt { font-size: 12px; }
  .af-spec dd { font-size: 15px; }
}

/* Équipements et description occupent toute la largeur de la page (au lieu
   de rester coincés dans la colonne étroite à côté des photos), ce qui évite
   d'avoir à faire défiler une longue description sur un écran d'ordinateur. */
.af-equip-section, .af-description-section { grid-column: 1 / -1; margin-top: 8px; }
@media (min-width: 640px) {
  .af-equip-section, .af-description-section { margin-top: 12px; }
}
.af-equip-section h2, .af-description-section h2 { font-size: 18px; margin: 0 0 14px; }
@media (min-width: 640px) {
  .af-equip-section h2, .af-description-section h2 { font-size: 20px; margin: 0 0 18px; }
}

.af-description { white-space: pre-line; color: var(--af-gray-700); font-size: 14px; max-width: 900px; }
@media (min-width: 640px) {
  .af-description { font-size: 15px; }
}

.af-equip-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  margin: 0;
  padding: 18px 16px;
  list-style: none;
  background: #fff;
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
}
.af-equip-list li { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: var(--af-gray-700); }
.af-equip-list svg { flex-shrink: 0; fill: none; stroke: #1E7B3B; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 480px) {
  .af-equip-list { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 640px) {
  .af-equip-list { gap: 14px 20px; padding: 22px 24px; }
  .af-equip-list li { font-size: 15px; }
}
@media (min-width: 900px) {
  .af-equip-list { grid-template-columns: repeat(4, 1fr); }
}

.af-contact-card {
  background: var(--af-navy);
  color: #fff;
  border-radius: var(--af-radius);
  padding: 20px;
  margin-top: 20px;
}
.af-contact-card h2 { margin: 0 0 6px; font-size: 17px; }
.af-contact-card p { margin: 0 0 16px; color: rgba(255,255,255,0.7); font-size: 14px; }
.af-contact-card .af-btn { width: 100%; margin-bottom: 8px; }
@media (min-width: 640px) {
  .af-contact-card { padding: 24px; margin-top: 24px; }
  .af-contact-card h2 { font-size: 18px; }
}

/* Les coordonnées de contact (carte + formulaire) forment maintenant une
   section à part entière, sous les points forts et la description, plutôt
   que de rester coincées dans la colonne étroite à côté des photos. Sur
   ordinateur, carte et formulaire s'affichent côte à côte pour limiter la
   hauteur de cette section. */
.af-contact-section { grid-column: 1 / -1; margin-top: 8px; }
@media (min-width: 640px) {
  .af-contact-section { margin-top: 12px; }
}
.af-contact-section .af-contact-card,
.af-contact-section .af-contact-form { margin-top: 0; }
@media (min-width: 860px) {
  .af-contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
}

.af-map {
  margin-top: 16px;
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
  overflow: hidden;
  height: 220px;
}
@media (min-width: 640px) {
  .af-map { margin-top: 20px; height: 320px; }
}

.af-contact-form { margin-top: 16px; }
.af-contact-form .af-form-actions { margin-top: 16px; }
.af-contact-form .af-btn { width: 100%; }
@media (min-width: 640px) {
  .af-contact-form { margin-top: 20px; }
}

/* ---------- Présentation (page d'accueil) ---------- */
.af-presentation {
  background: var(--af-white);
  border-top: 1px solid var(--af-gray-300);
  padding: 28px 0;
}
.af-presentation p {
  margin: 0;
  color: var(--af-gray-700);
  font-size: 14px;
  line-height: 1.7;
  max-width: 760px;
}
@media (min-width: 640px) {
  .af-presentation { padding: 40px 0; }
  .af-presentation p { font-size: 15px; }
}

.af-zone {
  background: var(--af-gray-100);
  border-top: 1px solid var(--af-gray-300);
  padding: 28px 0;
}
.af-zone h2 { margin: 0 0 10px; font-size: 17px; }
.af-zone p {
  margin: 0;
  color: var(--af-gray-700);
  font-size: 14px;
  line-height: 1.7;
  max-width: 760px;
}
@media (min-width: 640px) {
  .af-zone { padding: 40px 0; }
  .af-zone h2 { font-size: 19px; margin: 0 0 12px; }
  .af-zone p { font-size: 15px; }
}

/* ---------- Footer ---------- */

.af-footer {
  background: var(--af-navy);
  color: rgba(255,255,255,0.6);
  padding: 24px 0;
  font-size: 12px;
}
.af-footer .af-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
@media (min-width: 640px) {
  .af-footer { padding: 32px 0; font-size: 13px; }
  .af-footer .af-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }
}

.af-status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; padding: 4px 10px; border-radius: 999px; }
.af-status-disponible { background: #EEF7F0; color: #1E7B3B; }
.af-status-reserve { background: #FDF3E0; color: #9A6B00; }
.af-status-vendu { background: #FDF0F1; color: var(--af-accent-dark); }
.af-status-new { background: #E9F1FB; color: var(--af-navy); }

/* ---------- États de chargement ---------- */
.af-loading { text-align: center; padding: 48px 16px; color: var(--af-gray-500); }

/* ================================================================
   ESPACE PRO (admin) — mobile first
   ================================================================ */

.af-admin-body { background: var(--af-gray-100); min-height: 100vh; }

.af-admin-header {
  background: var(--af-navy);
  color: #fff;
}
.af-admin-header .af-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.af-admin-header .af-nav { flex-wrap: wrap; gap: 10px 16px; }
.af-admin-header .af-nav a { color: rgba(255,255,255,0.75); font-size: 12.5px; }
.af-admin-header .af-nav a:hover { color: #fff; }
@media (min-width: 640px) {
  .af-admin-header .af-container { height: 68px; padding-top: 0; padding-bottom: 0; flex-wrap: nowrap; }
  .af-admin-header .af-nav { gap: 20px; }
  .af-admin-header .af-nav a { font-size: 14px; }
}

.af-admin-main { padding: 24px 0 56px; }
.af-admin-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.af-admin-title h1 { font-size: 20px; margin: 0; letter-spacing: -0.3px; }
@media (min-width: 640px) {
  .af-admin-main { padding: 32px 0 80px; }
  .af-admin-title { margin-bottom: 24px; }
  .af-admin-title h1 { font-size: 24px; }
}

.af-panel {
  background: #fff;
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
  padding: 16px;
}
.af-panel + .af-panel { margin-top: 16px; }
@media (min-width: 640px) {
  .af-panel { padding: 24px; }
  .af-panel + .af-panel { margin-top: 20px; }
}

/* Liste des véhicules : la table défile horizontalement sur mobile
   plutôt que de tasser les colonnes de façon illisible. */
.af-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .af-table-scroll { margin: 0; padding: 0; overflow-x: visible; }
}
.af-table { width: 100%; min-width: 560px; border-collapse: collapse; }
@media (min-width: 640px) {
  .af-table { min-width: 0; }
}
.af-table th, .af-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--af-gray-100); font-size: 13px; }
.af-table th { color: var(--af-gray-500); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.af-table .af-thumb { width: 52px; height: 40px; border-radius: 6px; background: var(--af-gray-100) center/cover no-repeat; }
.af-table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (min-width: 640px) {
  .af-table th, .af-table td { padding: 12px 10px; font-size: 14px; }
  .af-table th { font-size: 12px; }
  .af-table .af-thumb { width: 56px; height: 42px; }
  .af-table-actions { gap: 8px; flex-wrap: nowrap; }
}

.af-form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) {
  .af-form-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
.af-form-row { display: flex; flex-direction: column; gap: 6px; }
.af-form-row.af-span-2 { grid-column: 1 / -1; }
.af-form-row label { font-size: 13px; font-weight: 600; color: var(--af-gray-700); }
.af-form-row .af-hint { font-size: 12px; color: var(--af-gray-500); font-weight: 400; }
.af-form-row input,
.af-form-row select,
.af-form-row textarea {
  border: 1px solid var(--af-gray-300);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 16px; /* évite le zoom automatique au focus sur mobile (iOS) */
  color: var(--af-ink);
  background: #fff;
  width: 100%;
}
.af-form-row input:focus,
.af-form-row select:focus,
.af-form-row textarea:focus { outline: 2px solid var(--af-navy); outline-offset: 1px; }
.af-form-row textarea { resize: vertical; min-height: 110px; }
@media (min-width: 640px) {
  .af-form-row input,
  .af-form-row select,
  .af-form-row textarea { font-size: 14px; padding: 10px 12px; }
}
.af-form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.af-equip-checkboxes { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }
.af-equip-checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--af-ink); }
.af-equip-checkbox input { width: auto; }
@media (min-width: 640px) {
  .af-equip-checkboxes { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .af-equip-checkboxes { grid-template-columns: repeat(3, 1fr); }
}
.af-form-actions .af-btn { flex: 1 1 auto; }
@media (min-width: 640px) {
  .af-form-actions { margin-top: 24px; }
  .af-form-actions .af-btn { flex: 0 0 auto; }
}

.af-existing-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.af-existing-photo { position: relative; width: 92px; }
.af-existing-photo img { width: 92px; height: 68px; object-fit: cover; border-radius: 8px; }
.af-existing-photo label { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; margin-top: 4px; color: var(--af-gray-700); }
.af-photo-actions { display: flex; gap: 4px; margin-top: 4px; }
.af-photo-move { flex: 1 1 0; min-height: 34px; border: 1px solid var(--af-gray-300); background: #fff; border-radius: 6px; font-size: 17px; line-height: 1; color: var(--af-gray-700); cursor: pointer; padding: 0; }
.af-photo-move:active { background: var(--af-gray-100); }
.af-photo-move:disabled { opacity: .35; cursor: default; }

.af-alert { border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; }
.af-alert-error { background: #FDF0F1; color: var(--af-accent-dark); border: 1px solid #F3C6CC; }
.af-alert-success { background: #EEF7F0; color: #1E7B3B; border: 1px solid #C7E6CE; }

.af-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--af-navy);
  padding: 20px;
}
.af-login-card {
  background: #fff;
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
}
.af-login-card .af-logo { margin-bottom: 20px; }
.af-login-card .af-btn { width: 100%; margin-top: 8px; }
@media (min-width: 640px) {
  .af-login-card { padding: 36px 32px; }
  .af-login-card .af-logo { margin-bottom: 24px; }
}

.af-checkbox-row { display: flex; align-items: center; gap: 8px; }
.af-checkbox-row input { width: auto; }

/* ---------- WhatsApp ---------- */
.af-btn-whatsapp { background: #25D366; color: #fff; }
.af-btn-whatsapp:hover { background: #1DA851; }

/* ---------- Véhicules similaires ---------- */
.af-similar { margin-top: 32px; }
.af-similar h2 { font-size: 18px; margin: 0 0 14px; }
@media (min-width: 640px) {
  .af-similar { margin-top: 48px; }
  .af-similar h2 { font-size: 20px; margin: 0 0 18px; }
}

/* ---------- Lightbox photo plein écran ---------- */
.af-lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 16, 28, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.af-lightbox[hidden] { display: none; }
.af-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.af-lightbox-close,
.af-lightbox-prev,
.af-lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  font-size: 20px;
  line-height: 1;
}
.af-lightbox-close:hover,
.af-lightbox-prev:hover,
.af-lightbox-next:hover { background: rgba(255,255,255,0.22); }
.af-lightbox-close { top: 14px; right: 14px; }
.af-lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); font-size: 26px; }
.af-lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); font-size: 26px; }
@media (min-width: 640px) {
  .af-lightbox-close { top: 20px; right: 20px; width: 48px; height: 48px; }
  .af-lightbox-prev { left: 20px; width: 48px; height: 48px; }
  .af-lightbox-next { right: 20px; width: 48px; height: 48px; }
}

/* ---------- Impression / export PDF d'une fiche véhicule ----------
   Approche volontairement simple : on masque tout ce qui n'a pas de sens sur
   papier (navigation, filtres, formulaires, boutons) et on laisse le
   visiteur utiliser « Imprimer... » de son navigateur (choix « Enregistrer
   en PDF » disponible nativement) plutôt que de générer un PDF côté serveur
   — pas de dépendance supplémentaire à installer chez l'hébergeur. */
@media print {
  .af-header, .af-footer, .af-breadcrumb,
  .af-gallery-thumbs, .af-print-btn,
  .af-contact-form, .af-similar,
  #af-lightbox {
    display: none !important;
  }
  body { background: #fff; }
  .af-detail { padding: 0; }
  .af-detail-grid { display: block; }
  .af-gallery-main {
    box-shadow: none;
    break-inside: avoid;
    aspect-ratio: 16 / 10;
  }
  .af-detail-header { display: block; }
  .af-contact-card {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
  .af-contact-card p { color: #444 !important; }
  .af-contact-card .af-btn {
    display: block;
    background: none !important;
    color: #000 !important;
    border: none;
    padding: 2px 0;
    text-decoration: underline;
    width: auto;
  }
  .af-contact-card .af-btn svg { display: none; }
}
