/* ═══════════════════════════════════════════════════════════════════════════
   Jetour Concessionnaire — Theme Override (Astra → Premium Automotive)
   Ce fichier remplace visuellement le thème Astra sans le désactiver.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables globales ────────────────────────────────────────────────── */
:root {
  --jt-accent:   #CC0000;
  --jt-dark:     #0a0a0a;
  --jt-header-h: 72px;
}

/* ── Reset global body ─────────────────────────────────────────────────── */
html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  background: #ffffff !important;
  color: #111111 !important;
  margin: 0 !important;
  padding: 0 !important;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER — Remplacement complet du header Astra
   ═══════════════════════════════════════════════════════════════════════════ */

/* Masquer le header Astra original */
#masthead,
.site-header,
.ast-primary-header-bar,
.main-header-bar,
.ast-above-header,
.ast-below-header,
.ast-header-break-point .main-navigation,
#ast-mobile-header {
  display: none !important;
}

/* Injection d'un nouveau header premium via pseudo-element du body */
body::before {
  display: none; /* placeholder — le vrai header est injecté via PHP */
}

/* Notre header custom injecté par le plugin */
#jt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  height: var(--jt-header-h);
  background: rgba(8, 8, 8, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#jt-header.scrolled {
  background: rgba(8, 8, 8, 1);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.jt-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 32px;
}

/* Logo */
.jt-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.jt-header-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.jt-header-logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.jt-header-logo-text span {
  color: var(--jt-accent);
}

/* Navigation */
.jt-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jt-header-nav li {
  margin: 0;
  padding: 0;
}

.jt-header-nav li a,
.jt-header-nav li a:visited {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  transition: color 0.2s ease, background 0.2s ease !important;
  display: block !important;
  white-space: nowrap;
}

.jt-header-nav li a:hover,
.jt-header-nav li.current-menu-item > a,
.jt-header-nav li.current_page_item > a {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.jt-header-nav li.jt-nav-cta > a {
  background: var(--jt-accent) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  margin-left: 8px;
}

.jt-header-nav li.jt-nav-cta > a:hover {
  background: #aa0000 !important;
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* CTA WhatsApp dans le header */
.jt-header-wa {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #25D366 !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  padding: 8px 16px;
  border: 1px solid rgba(37, 211, 102, 0.4);
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.jt-header-wa:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: #25D366;
}

.jt-header-wa svg { flex-shrink: 0; }

/* Menu hamburger mobile */
.jt-header-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.jt-header-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENU PRINCIPAL — Décalage pour le header fixe
   ═══════════════════════════════════════════════════════════════════════════ */

/* Compenser le header fixe */
#page,
.site,
.ast-page-builder-template,
body.page {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

#content,
.site-content,
.ast-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ajouter le décalage uniquement sur les wrappers de page */
.hfeed #content,
.blog #content,
.single #content,
.page #content {
  padding-top: 0 !important;
}

/* Le hero du plugin a déjà height:100vh donc le header fixe passe dessus */
/* Pour les autres pages, on ajoute un padding-top au premier enfant */
.page:not(.page-template-default) .entry-content > *:first-child:not(.jt-hero):not(.jt-single-hero):not(.jt-listing-page):not([class^="jt-"]) {
  padding-top: calc(var(--jt-header-h) + 24px);
}

/* Correction spécifique : quand le contenu commence par un shortcode plugin */
.entry-content .jt-hero,
.entry-content .jt-single-page,
.entry-content .jt-listing-page {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative;
}

/* Décalage du hero pour le header fixe */
.entry-content .jt-hero {
  padding-top: 0; /* Le hero prend 100vh, l'overlay couvre le header */
}

/* Listing page et single page : supprimer les marges Astra */
.jt-listing-page,
.jt-single-page {
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MASQUER LES ÉLÉMENTS PARASITES D'ASTRA
   ═══════════════════════════════════════════════════════════════════════════ */

/* Titre de page (affiché par Astra avant le contenu) */
.ast-page-title-bar,
.page-title-bar,
.entry-header.ast-no-thumbnail,
.ast-blog-single-element .entry-header,
.page .entry-title,
.page .posted-on,
.page .entry-meta,
.page .entry-footer,
.page .author-bio-wrap,
.page .post-navigation,
.page .comments-area,
.page .comments-title,
.singular .ast-page-title-bar,
.ast-header-width-full {
  display: none !important;
}

/* Sidebar — forcer full width */
.ast-right-sidebar .ast-sidebar-layout-content,
.ast-left-sidebar .ast-sidebar-layout-content,
#secondary,
.widget-area {
  display: none !important;
}

/* Forcer layout full-width */
.site-content .ast-container,
.content-area,
#primary {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

/* Supprimer padding interne Astra sur les pages avec shortcodes plugin */
.ast-page-builder-template .entry-content,
.page-template-default .entry-content,
.entry-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* Supprimer le breadcrumb Astra */
.ast-breadcrumbs,
.ast-breadcrumbs-wrapper,
#breadcrumbs {
  display: none !important;
}

/* Supprimer les marges du wrapper de page */
.ast-article-inner,
.ast-page-builder-template .ast-article-inner {
  padding: 0 !important;
  margin: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER — Override du footer Astra
   ═══════════════════════════════════════════════════════════════════════════ */

.site-footer,
#colophon,
.ast-small-footer,
.ast-footer-overlay {
  background: #0a0a0a !important;
  color: rgba(255, 255, 255, 0.5) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.site-footer *,
#colophon * {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.8rem !important;
}

.site-footer a,
#colophon a {
  color: rgba(255, 255, 255, 0.5) !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.site-footer a:hover,
#colophon a:hover {
  color: var(--jt-accent) !important;
}

.ast-footer-copyright {
  padding: 20px 32px !important;
  text-align: center !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LISTING PAGE — Améliorations premium
   ═══════════════════════════════════════════════════════════════════════════ */

/* Header de la page listing en dark premium */
.jt-listing-header {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%) !important;
  color: #ffffff !important;
  padding: calc(var(--jt-header-h) + 60px) 24px 60px !important;
  border-bottom: none !important;
}

.jt-listing-title {
  color: #ffffff !important;
}

.jt-listing-subtitle {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Filtres sticky améliorés */
.jt-filters-bar {
  top: var(--jt-header-h) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE PAGE — Ajustement pour le header fixe
   ═══════════════════════════════════════════════════════════════════════════ */

.jt-single-hero {
  padding-top: 0 !important;
}

/* Le hero prend 100vh, le contenu du hero est décalé vers le bas automatiquement */
/* Mais on ajuste pour que le contenu ne soit pas coupé par le header */
.jt-single-hero__content {
  padding-bottom: 100px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE HERO — Ajustement pour header fixe
   ═══════════════════════════════════════════════════════════════════════════ */

.jt-hero {
  margin-top: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — Header responsive
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .jt-header-nav,
  .jt-header-wa {
    display: none;
  }

  .jt-header-toggle {
    display: flex;
  }

  /* Menu mobile déroulant */
  .jt-header-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--jt-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 8, 8, 0.98);
    padding: 32px 24px;
    gap: 8px;
    z-index: 9989;
    overflow-y: auto;
  }

  .jt-header-nav.open li a {
    font-size: 1.1rem !important;
    padding: 14px 16px !important;
  }
}

@media (min-width: 901px) {
  .jt-header-nav {
    display: flex !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CORRECTIONS ASTRA DIVERSES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Supprimer le lien "Page d'exemple" dans la nav */
/* (ce lien Astra par défaut apparaît parfois) */

/* Empêcher Astra d'ajouter du padding au body pour son header */
body.ast-header-break-point,
body.ast-sticky-header-active {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Fix: boutons du plugin ne doivent pas hériter des styles Astra */
.entry-content .jt-btn,
.jt-hero .jt-btn,
.jt-single-hero .jt-btn {
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  border-radius: 50px !important;
}

/* Fix: liens dans le contenu plugin ne doivent pas être bleus Astra */
.jt-single-page a:not(.jt-btn),
.jt-listing-page a:not(.jt-btn),
.jt-hero a:not(.jt-btn) {
  color: inherit;
}

/* Assurer que le plugin gère sa propre typographie */
.jt-section__title,
.jt-hero__title,
.jt-single-hero__title,
.jt-listing-title {
  font-family: 'Inter', sans-serif !important;
}
