/* =========================================================================
   Voitures — habillage ordinateur
   -------------------------------------------------------------------------
   Chargée par views/reservation/locationsCar.php. Même vocabulaire visuel que
   la version téléphone (css/voitures-mobile.css) : mêmes couleurs, mêmes
   pastilles de caractéristiques, même carte. Ce qui change tient à la largeur
   disponible — un panneau de filtres à demeure sur le côté, et une grille de
   trois cartes au lieu d'une colonne.

   Les deux feuilles ne sont jamais chargées ensemble : une même page est servie
   soit à un téléphone, soit à un ordinateur.
   ========================================================================= */

:root {
  --vt-blue:  var(--yb-blue, #0d65c9);
  --vt-navy:  var(--yb-navy, #0d233e);
  --vt-cyan:  var(--yb-cyan, #29abe2);
  --vt-ink:   #1f2937;
  --vt-body:  #4b5563;
  --vt-muted: #9ca3af;
  --vt-line:  #e5e7eb;
  --vt-page:  #f2f5fa;
}

.vt-page { background: var(--vt-page); padding-bottom: 56px; }

/* ---------- Bandeau ------------------------------------------------------- */

.vt-hero {
  position: relative; overflow: hidden;
  padding: 54px 0 62px;
  background: linear-gradient(120deg, var(--vt-navy) 0%, #143a6b 52%, var(--vt-blue) 100%);
  color: #fff;
}
/* Halos et lignes de fuite : de la profondeur sans photo. Le parc ne compte
   qu'un seul visuel en base ; un héros photographique aurait montré la même
   voiture à tout le monde. */
.vt-hero::before,
.vt-hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.vt-hero::before {
  width: 520px; height: 520px; top: -300px; right: -120px;
  background: radial-gradient(circle, rgba(41,171,226,.30), transparent 70%);
}
.vt-hero::after {
  width: 420px; height: 420px; bottom: -290px; left: -110px;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
}
.vt-hero__in { position: relative; z-index: 1; }
.vt-hero__titre {
  margin: 0 0 8px; color: #fff;
  font-size: 42px; font-weight: 800; letter-spacing: -1px; line-height: 1.1;
}
.vt-hero__titre span { color: var(--vt-cyan); }
.vt-hero__sub { margin: 0; font-size: 17px; color: rgba(255,255,255,.88); max-width: 560px; }

/* Bascule Louer/Acheter : purement visuelle (toutes les voitures sont
   proposées dans les deux modes), voir data-yb-mode-btn dans locationsCar.php.
   [data-mode] est posé sur [data-yb-liste] et pilote les variantes --location
   / --achat des cartes plus bas. */
.vt-mode { display: inline-flex; gap: 4px; margin-top: 20px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.14); }
.vt-mode__btn {
  padding: 9px 20px; border: 0; border-radius: 999px; background: transparent;
  color: rgba(255,255,255,.85); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.vt-mode__btn.is-on { background: #fff; color: var(--vt-navy); }

/* Trois repères chiffrés, tirés du parc réel. */
.vt-hero__chiffres { display: flex; gap: 34px; margin-top: 26px; }
.vt-chiffre strong { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; }
.vt-chiffre span   { font-size: 12.5px; color: rgba(255,255,255,.72); }

/* ---------- Barre de gabarits, à cheval sur le bandeau -------------------- */

.vt-barre {
  position: relative; z-index: 2; margin-top: -28px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 14px 34px rgba(13,35,62,.14);
}
.vt-barre__titre { font-size: 13px; font-weight: 700; color: var(--vt-muted); margin-right: 4px; }
.vt-cat {
  padding: 9px 18px; border-radius: 999px;
  background: #f4f6fa; border: 1px solid transparent;
  color: var(--vt-body) !important; font-size: 14px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.vt-cat:hover { background: #e8eefb; color: var(--vt-blue) !important; }
.vt-cat.is-on {
  background: var(--vt-blue); color: #fff !important;
  box-shadow: 0 6px 16px rgba(37,99,235,.30);
}
.vt-barre__compte { margin-left: auto; font-size: 13.5px; color: var(--vt-body); }
.vt-barre__compte strong { color: var(--vt-ink); }

/* ---------- Deux colonnes ------------------------------------------------- */

.vt-corps {
  display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 26px;
  margin-top: 26px;
}

.vt-panneau {
  align-self: start; position: sticky; top: 20px;
  padding: 20px; background: #fff; border-radius: 16px;
  box-shadow: 0 2px 10px rgba(13,35,62,.08);
}
.vt-panneau__titre {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 16px; font-size: 16px; font-weight: 700; color: var(--vt-ink);
}
.vt-panneau__titre i { color: var(--vt-blue); }

.vt-champ { margin-bottom: 15px; }
.vt-champ label,
.vt-champ legend {
  display: block; margin: 0 0 6px; padding: 0;
  font-size: 12.5px; font-weight: 600; color: var(--vt-body);
}
.vt-champ select,
.vt-champ input[type=number] {
  width: 100%; height: 42px;
  background: #f7f8fa; border: 1px solid #eceef2; border-radius: 10px;
  padding: 0 12px; font-size: 14px; color: var(--vt-ink);
}
.vt-champ select:focus,
.vt-champ input:focus {
  outline: none; background: #fff;
  border-color: var(--vt-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.vt-champ--duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vt-champ fieldset { border: 0; margin: 0; padding: 0; }

.vt-equips { display: flex; flex-direction: column; gap: 8px; }
.vt-equip { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--vt-body); }
.vt-equip input { width: 17px; height: 17px; accent-color: var(--vt-blue); }
.vt-equip i { color: var(--vt-blue); }

.vt-panneau__actions { display: flex; gap: 10px; margin-top: 18px; }
.vt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 18px; border: 0; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.vt-btn--plat  { background: #eef1f6; color: var(--vt-ink) !important; }
.vt-btn--plat:hover { background: #e3e8f0; }
.vt-btn--plein { background: linear-gradient(135deg, var(--vt-navy), var(--vt-blue)); color: #fff !important; }
.vt-btn--plein:hover { filter: brightness(1.08); }
.vt-panneau__actions .vt-btn { flex: 1 1 0; padding: 0 10px; }

/* ---------- Grille de cartes ---------------------------------------------- */

.vt-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.vt-carte {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(13,35,62,.09);
  transition: transform .18s ease, box-shadow .18s ease;
}
.vt-carte:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(13,35,62,.16); }

.vt-carte__media { position: relative; height: 186px; background: #eef2f9; overflow: hidden; }
.vt-carte__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.vt-carte:hover .vt-carte__media img { transform: scale(1.05); }
.vt-carte__media--vide {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2f9, #dde6f5);
  color: #b7c7e0; font-size: 62px;
}
.vt-carte__media::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 78px;
  background: linear-gradient(180deg, transparent, rgba(9,15,28,.62));
  pointer-events: none;
}
.vt-carte__media--vide::after { display: none; }

.vt-prix { position: absolute; left: 14px; bottom: 12px; z-index: 1; margin: 0; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.vt-prix strong { font-size: 23px; font-weight: 800; letter-spacing: -.4px; }
.vt-prix span   { font-size: 12px; font-weight: 600; opacity: .9; margin-left: 4px; }
.vt-prix__absent { font-size: 14px; font-weight: 700; }

/* Deux variantes par carte (location/achat), une seule visible à la fois —
   pilotées par [data-mode] sur [data-yb-liste]. Par défaut : location.
   Double classe (.vt-prix.vt-prix--achat) : la spécificité doit battre les
   règles de base .vt-prix/.vt-pied, définies plus bas dans ce fichier. */
.vt-prix.vt-prix--achat, .vt-pied.vt-pied--achat { display: none; }
[data-mode="achat"] .vt-prix.vt-prix--location, [data-mode="achat"] .vt-pied.vt-pied--location { display: none; }
[data-mode="achat"] .vt-prix.vt-prix--achat { display: block; }
[data-mode="achat"] .vt-pied.vt-pied--achat { display: flex; }
.vt-carte__media--vide .vt-prix { color: var(--vt-navy); text-shadow: none; }
.vt-carte__media--vide .vt-prix span { opacity: .68; }

.vt-gabarit {
  position: absolute; top: 13px; left: 14px; z-index: 1;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.94); color: var(--vt-navy);
  font-size: 11.5px; font-weight: 700;
}
.vt-coeur {
  position: absolute; top: 11px; right: 12px; z-index: 1;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.94); color: #d5d8e6;
  font-size: 17px; line-height: 1; cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}
.vt-coeur:hover { transform: scale(1.08); }
.vt-coeur.is-on { color: var(--yb-red, #ce130d); }

.vt-carte__corps { display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px 16px 16px; }
.vt-titre { margin: 0 0 3px; font-size: 17px; font-weight: 700; }
.vt-titre a { color: var(--vt-ink) !important; }
.vt-titre a:hover { color: var(--vt-blue) !important; }
.vt-lieu { margin: 0 0 12px; font-size: 12.5px; color: var(--vt-muted); }
.vt-lieu i { margin-right: 4px; }

.vt-specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.vt-specs li {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 9px;
  background: #f4f6fa; font-size: 11.5px; font-weight: 600; color: var(--vt-body);
}
.vt-specs i { color: var(--vt-blue); font-size: 13px; }
.vt-specs li.is-vide { background: #fff7ed; color: #b45309; }

/* Le pied colle au bas de la carte : à contenus inégaux, les boutons restent
   alignés d'une carte à l'autre. */
.vt-pied { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.vt-pied .vt-btn { flex: 1 1 auto; }
.vt-detail { flex: 0 0 auto; font-size: 13.5px; font-weight: 600; color: var(--vt-blue) !important; }

/* ---------- Écran vide et pagination -------------------------------------- */

.vt-vide {
  padding: 60px 30px; text-align: center;
  background: #fff; border-radius: 18px; box-shadow: 0 2px 10px rgba(13,35,62,.08);
}
.vt-vide i { font-size: 54px; color: #cbd5e1; }
.vt-vide p { margin: 14px 0 16px; font-size: 15px; color: var(--vt-body); }

.vt-pages { margin-top: 26px; }
.vt-pages .pagination {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center;
  margin: 0; padding: 0; list-style: none;
}
.vt-pages .page-link {
  display: flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; border-radius: 11px;
  background: #fff; border: 1px solid var(--vt-line);
  color: var(--vt-body); font-size: 14px; font-weight: 600;
}
.vt-pages .page-link:hover { border-color: var(--vt-blue); color: var(--vt-blue); }
.vt-pages .active .page-link { background: var(--vt-blue); border-color: var(--vt-blue); color: #fff; }
.vt-pages .disabled .page-link { opacity: .45; }

/* ---------- Largeurs intermédiaires --------------------------------------- */

@media (max-width: 1199.98px) {
  .vt-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  /* Le panneau passe au-dessus de la liste : à cette largeur, une colonne de
     288px ne laisse plus la place à deux cartes. */
  .vt-corps { grid-template-columns: minmax(0, 1fr); }
  .vt-panneau { position: static; }
  .vt-hero__titre { font-size: 34px; }
  .vt-hero { padding: 40px 0 52px; }
}
@media (max-width: 767.98px) {
  .vt-grille { grid-template-columns: minmax(0, 1fr); }
  .vt-hero__chiffres { gap: 22px; }
  .vt-barre { gap: 8px; }
  .vt-barre__compte { margin-left: 0; width: 100%; }
}
