/* ==========================================================================
   SHOWROOMS — pages publiques /showrooms et /showroom/{slug}
   Baniola.tn
   --------------------------------------------------------------------------
   Aligné sur la langue visuelle voitures-neuves :
     navy    #0B2A5B   bleu #014fa3 / #013f84   jaune #FFC62B
     fond    #F4F6FA   cartes blanches, bordure #E3E8F0, radius 16/12
   ========================================================================== */

/* ==========================================================================
   /showrooms — liste des showrooms
   ========================================================================== */

/* Hero navy (style vn-hero : dégradé + halo jaune + barre jaune en bas) */
.showrooms-hero {
  position: relative;
  overflow: hidden;
  min-height: auto;
  padding: 36px 16px 40px;
  text-align: center;
  border-radius: 16px;
  margin-top: 12px;
  margin-bottom: 14px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 198, 43, .22) 0%, rgba(255, 198, 43, 0) 55%),
    linear-gradient(135deg, #0B2A5B 0%, #014fa3 100%);
  box-shadow: 0 10px 30px rgba(11, 42, 91, .18);
}

.showrooms-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #FFC62B, rgba(255, 198, 43, 0));
}

.showrooms-hero > * {
  position: relative;
  z-index: 1;
}

.showrooms-hero h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0 0 8px 0;
}

.showrooms-hero p {
  font-size: .92rem;
  color: rgba(255, 255, 255, .82);
  max-width: 480px;
  margin: 0 auto;
}

.showrooms-hero .hero-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 7px 18px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
}

.showrooms-hero .hero-count i { color: #FFC62B; }

/* ===== Grille de cartes ===== */
.showrooms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.showroom-card {
  position: relative;
  background: #fff;
  border: 1px solid #E3E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(11, 42, 91, .05), 0 6px 18px rgba(11, 42, 91, .06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
}

.showroom-card:hover {
  transform: translateY(-5px);
  border-color: rgba(11, 42, 91, .28);
  box-shadow: 0 14px 34px rgba(11, 42, 91, .12);
}

.showroom-card-top {
  height: 56px;
  background: linear-gradient(135deg, #EAF0FA 0%, #D9E4F2 100%);
}

.showroom-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -45px;
  margin-bottom: 10px;
}

.showroom-card-logo img,
.showroom-card-logo .logo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

.showroom-card-logo img { object-fit: cover; }

.showroom-card-logo .logo-placeholder {
  background: linear-gradient(135deg, #F4F6FA 0%, #E3EAF4 100%);
  color: #0B2A5B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.showroom-card-body {
  padding: 0 16px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.showroom-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #12223D;
  margin: 0 0 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showroom-card-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 700;
  color: #1E8449;
  background: #e8f8f0;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.showroom-card-meta {
  font-size: .85rem;
  color: #5B6B85;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.showroom-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.showroom-card-meta i { color: #5B6B85; width: 14px; }
.showroom-card-meta strong { color: #12223D; }

.showroom-card-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 20px;
  min-height: 46px;
  background: transparent;
  color: #0B2A5B;
  border: 1.5px solid #0B2A5B;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

/* Lien étiré : toute la carte ouvre la page du showroom */
.showroom-card-btn::after {
  content: "";
  position: absolute;
  inset: 0;
}

.showroom-card-btn i { transition: transform .2s ease; }

.showroom-card-btn:hover {
  background: #0B2A5B;
  color: #fff;
  text-decoration: none;
}

.showroom-card-btn:hover i { transform: translateX(3px); }

.showrooms-empty {
  text-align: center;
  padding: 60px 20px;
  color: #5B6B85;
}

.showrooms-empty i { font-size: 3rem; color: #dee2e6; margin-bottom: 16px; }

.showrooms-pagination {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

/* ===== CTA création de showroom (style vn-cta) ===== */
.showroom-cta {
  position: relative;
  overflow: hidden;
  margin-top: 36px;
  padding: 34px 20px;
  background: linear-gradient(135deg, #0B2A5B 0%, #12407F 100%);
  border-radius: 16px;
  text-align: center;
  color: #fff;
}

.showroom-cta::before,
.showroom-cta::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.showroom-cta::before {
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, .07);
  top: -80px;
  right: -60px;
}

.showroom-cta::after {
  width: 130px;
  height: 130px;
  background: rgba(255, 198, 43, .15);
  bottom: -60px;
  left: -40px;
}

.showroom-cta > * { position: relative; z-index: 1; }

.showroom-cta h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
}

.showroom-cta p {
  color: rgba(255, 255, 255, .8);
  font-size: .95rem;
  margin: 0 0 18px 0;
}

.showroom-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #FFC62B;
  color: #0B2A5B;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.showroom-cta-btn:hover {
  background: #F2B700;
  color: #0B2A5B;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ==========================================================================
   /showroom/{slug} — fiche publique d'un showroom
   ========================================================================== */

.showroom-hero {
  background: #fff;
  border: 1px solid #E3E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(11, 42, 91, .05), 0 6px 18px rgba(11, 42, 91, .06);
  margin-top: 12px;
  margin-bottom: 16px;
}

.showroom-cover {
  width: 100%;
  height: 180px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 198, 43, .15) 0%, transparent 45%),
    linear-gradient(135deg, #0B2A5B 0%, #014fa3 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.showroom-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .4));
}

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

.showroom-identity {
  padding: 0 16px 18px;
  text-align: center;
}

.showroom-logo-wrap {
  margin-top: -46px;
  margin-bottom: 10px;
  display: inline-block;
  position: relative;
  z-index: 2;
}

.showroom-logo-wrap img,
.showroom-logo-wrap .logo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  background: #fff;
}

.showroom-logo-wrap .logo-placeholder {
  background: linear-gradient(135deg, #0B2A5B 0%, #014fa3 100%);
  color: #FFC62B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.showroom-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #12223D;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

/* Badge vérifié : pastille verte sur le logo */
.showroom-logo-wrap .verified-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1E8449;
  border: 3px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.showroom-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 14px;
  font-size: .85rem;
  color: #5B6B85;
  margin-bottom: 14px;
}

.showroom-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.showroom-meta i { color: #014fa3; }
.showroom-meta strong { color: #014fa3; }

/* ===== Boutons contact ===== */
.showroom-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.showroom-contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  min-height: 42px;
  border-radius: 12px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}

.contact-phone { background: #014fa3; color: #fff; }
.contact-phone:hover { background: #013f84; color: #fff; }

.contact-whatsapp { background: #25d366; color: #fff; }
.contact-whatsapp:hover { background: #1da851; color: #fff; }

.contact-email { background: #fff; color: #014fa3; border: 1px solid #014fa3; }
.contact-email:hover { background: #014fa3; color: #fff; }

/* ===== Onglets nav-tabs ===== */
.showroom-tabs {
  border-bottom: 2px solid #E3E8F0;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.showroom-tabs::-webkit-scrollbar { display: none; }

.showroom-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: #5B6B85;
  font-weight: 600;
  font-size: .88rem;
  padding: 10px 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  transition: color .2s ease, border-color .2s ease;
}

.showroom-tabs .nav-link i { font-size: .8rem; }

.showroom-tabs .nav-link:hover {
  color: #014fa3;
  border-color: transparent transparent #b6d4f0;
}

.showroom-tabs .nav-link.active {
  color: #014fa3;
  border-bottom-color: #FFC62B;
  background: transparent;
}

.showroom-tabs .nav-link .tab-count {
  background: #EAF0FA;
  color: #014fa3;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 700;
}

.showroom-tabs .nav-link.active .tab-count {
  background: #014fa3;
  color: #fff;
}

/* ===== Contenu des onglets ===== */
.showroom-tab-content { padding: 18px 0 24px; }

.showroom-info-card {
  background: #fff;
  border: 1px solid #E3E8F0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(11, 42, 91, .05), 0 6px 18px rgba(11, 42, 91, .06);
  padding: 18px;
  margin-bottom: 14px;
}

.showroom-info-card h3 {
  font-size: .95rem;
  font-weight: 800;
  color: #12223D;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.showroom-info-card h3 i { color: #014fa3; }

.showroom-info-card p {
  font-size: .9rem;
  color: #5B6B85;
  margin: 0;
  line-height: 1.65;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: .9rem;
  color: #5B6B85;
}

.info-row:last-child { border-bottom: none; }
.info-row i { color: #014fa3; width: 18px; margin-top: 3px; }

/* ===== Horaires ===== */
.showroom-hours {
  font-size: .88rem;
  display: flex;
  flex-direction: column;
}

.showroom-hours .hour-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f5;
}

.showroom-hours .hour-row:last-child { border-bottom: none; }
.showroom-hours .day { font-weight: 600; color: #12223D; }
.showroom-hours .closed { color: #C0392B; font-weight: 600; }
.showroom-hours .open { color: #1E8449; }

/* ===== Titre section annonces ===== */
.showroom-ads-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #12223D;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.showroom-ads-title i { color: #014fa3; }

/* ===== Carte Leaflet ===== */
.showroom-map {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  border: 1px solid #E3E8F0;
  z-index: 1;
  margin-bottom: 12px;
}

.showroom-directions-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 20px;
  min-height: 46px;
  background: #014fa3;
  color: #fff;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease;
}

.showroom-directions-btn:hover {
  background: #013f84;
  color: #fff;
  text-decoration: none;
}

/* ===== Empty state ===== */
.showroom-empty {
  text-align: center;
  padding: 40px 16px;
  color: #5B6B85;
}

.showroom-empty i { font-size: 2.5rem; color: #dee2e6; margin-bottom: 12px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (min-width: 576px) {
  .showrooms-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  /* Liste */
  .showrooms-hero { padding: 48px 20px 52px; }
  .showrooms-hero h1 { font-size: 2.1rem; }
  .showrooms-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .showroom-card-top { height: 64px; }
  .showroom-card-logo { margin-top: -55px; }
  .showroom-card-logo img,
  .showroom-card-logo .logo-placeholder { width: 110px; height: 110px; }

  /* Fiche */
  .showroom-hero { padding-top: 0; }
  .showroom-cover {
    height: 300px;
  }
  .showroom-logo-wrap { margin-top: -62px; }
  .showroom-logo-wrap img,
  .showroom-logo-wrap .logo-placeholder { width: 130px; height: 130px; }
  .showroom-name { font-size: 1.8rem; }
  .showroom-identity { max-width: 900px; margin: 0 auto; padding-bottom: 26px; }
  .showroom-contact a { padding: 11px 24px; font-size: .9rem; }
  .showroom-tabs .nav-link { font-size: .95rem; padding: 12px 20px; }
  .showroom-info-card { padding: 24px; }
}

@media (min-width: 1200px) {
  .showrooms-grid { grid-template-columns: repeat(4, 1fr); }
}
