/* ============================================================================
   Section « Louer un véhicule » — vitrine.
   HTML : app/Views/partials/vitrine_location.php
   ========================================================================== */

.loc { padding: clamp(3rem, 7vw, 5.5rem) 0; }

.loc__tete {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 900px) {
  .loc__tete { grid-template-columns: 1fr 1fr; }
}

.loc__tete .btn { margin-top: 1rem; }

/* ---- Visuel -------------------------------------------------------------- */

.loc__visuel {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--lf-nuage, #e6e4ef);
}

.loc__visuel img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tant que la photo n'est pas fournie : un aplat de marque, pas un cadre gris
   barré. Une vitrine qui montre ses trous décrédibilise plus qu'un aplat
   assumé — et celui-ci reste présentable indéfiniment. */
.loc__visuel--vide {
  background:
    radial-gradient(120% 90% at 20% 15%, rgba(255,255,255,.22), transparent 60%),
    linear-gradient(140deg, var(--lf-indigo, #2e2482), var(--lf-magenta, #a5195b));
}

/* ---- Grille d'annonces --------------------------------------------------- */

.loc__grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: clamp(.9rem, 2vw, 1.4rem);
  margin-top: clamp(2rem, 5vw, 3rem);
}

.loc__i {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--lf-nuage, #e6e4ef);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.loc__i:hover {
  transform: translateY(-3px);
  border-color: var(--lf-magenta, #a5195b);
  box-shadow: 0 16px 32px -20px rgb(23 21 41 / .5);
}

.loc__i-photo {
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, #1d1655, #a5195b);
  overflow: hidden;
}

.loc__i-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.loc__i-corps {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem 1rem 1rem;
}

.loc__i-corps strong { font-size: .95rem; line-height: 1.3; }
.loc__i-corps small  { font-size: .78rem; color: var(--lf-ardoise, #55516e); }

.loc__i-prix {
  margin-top: .4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lf-magenta, #a5195b);
  font-variant-numeric: tabular-nums;
}
.loc__i-prix i { font-style: normal; font-size: .78rem; font-weight: 500; opacity: .75; }
.loc__i-prix--sur { font-size: .9rem; }

/* ---- Vitrine vide -------------------------------------------------------- */

.loc__vide {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px dashed var(--lf-brume, #8a86a3);
  border-radius: 16px;
  text-align: center;
}

.loc__vide p {
  max-width: 42rem;
  margin: 0 auto 1rem;
  line-height: 1.65;
  color: var(--lf-ardoise, #55516e);
}

/* ---- Arguments ----------------------------------------------------------- */

.loc__args {
  list-style: none;
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.loc__args li {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--lf-ardoise, #55516e);
  padding-left: .9rem;
  border-left: 2px solid var(--lf-magenta, #a5195b);
}

.loc__args strong {
  display: block;
  margin-bottom: .25rem;
  font-size: .95rem;
  color: var(--lf-encre, #171529);
}

@media (prefers-reduced-motion: reduce) {
  .loc__i { transition: none; }
  .loc__i:hover { transform: none; }
}

/* ---- Photo de vitrine, avec ou sans fichier ------------------------------- */

.vphoto {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--lf-nuage, #e6e4ef);
}

.vphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tant que le fichier n'est pas déposé : un aplat de marque. Présentable
   indéfiniment, contrairement à un cadre gris marqué « image manquante ». */
.vphoto--vide {
  background:
    radial-gradient(120% 90% at 20% 15%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(140deg, var(--lf-indigo, #2e2482), var(--lf-magenta, #a5195b));
}

/* Le héros : la photo passe DERRIÈRE le texte, assombrie juste assez pour que
   le titre reste lisible sur n'importe quelle zone de l'image. */
.hro__photo {
  position: absolute;
  inset: 0;
  border-radius: 0;
  z-index: 0;
}

.hro__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(20, 16, 60, .92) 0%,
    rgba(20, 16, 60, .78) 42%,
    rgba(20, 16, 60, .35) 100%);
}

@media (max-width: 899px) {
  /* Sur téléphone le texte occupe toute la largeur : le voile doit couvrir
     partout, sinon la fin du titre passe sur une zone claire. */
  .hro__photo::after {
    background: linear-gradient(180deg,
      rgba(20, 16, 60, .88) 0%, rgba(20, 16, 60, .94) 100%);
  }
}

.hro__in { position: relative; z-index: 1; }
