/*
Theme Name:  Jetour Auto
Theme URI:   https://jetour-togo.com
Description: Thème premium pour concessionnaire automobile Jetour — conçu pour le plugin Jetour Concessionnaire Premium.
Author:      Jetour Togo
Version:     1.0.0
Text Domain: jetour-theme
Requires at least: 6.0
Requires PHP:      8.0
*/

/* ═══════════════════════════════════════════════════════════════════════════
   JETOUR THEME — Base CSS
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --jt-accent:    #CC0000;
  --jt-dark:      #1a1a2e;
  --jt-black:     #0a0a0a;
  --jt-white:     #ffffff;
  --jt-grey-100:  #f5f5f5;
  --jt-grey-200:  #e8e8e8;
  --jt-grey-400:  #999999;
  --jt-grey-600:  #555555;
  --jt-grey-800:  #222222;
  --jt-wa:        #25D366;
  --jt-radius:    10px;
  --jt-header-h:  72px;
  --jt-transition:.25s cubic-bezier(.4,0,.2,1);
  --jt-font:      'Inter', system-ui, -apple-system, sans-serif;
  --jt-max-width: 1280px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--jt-font);
  background: var(--jt-white);
  color: var(--jt-grey-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── HEADER ─────────────────────────────────────────────────────────────── */

#jt-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--jt-header-h);
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 9990;
  transition: background var(--jt-transition), box-shadow var(--jt-transition);
}

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

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

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

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

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

.jt-logo-text em {
  color: var(--jt-accent);
  font-style: normal;
}

/* Navigation */
.jt-main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
  justify-content: center;
}

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

.jt-main-nav a {
  color: rgba(255,255,255,0.78);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 6px;
  display: block;
  white-space: nowrap;
  transition: color var(--jt-transition), background var(--jt-transition);
}

.jt-main-nav a:hover,
.jt-main-nav .current-menu-item > a,
.jt-main-nav .current_page_item > a {
  color: #fff;
  background: rgba(255,255,255,0.09);
}

/* Header actions */
.jt-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.jt-header-wa {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--jt-wa);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid rgba(37,211,102,0.35);
  border-radius: 7px;
  white-space: nowrap;
  transition: all var(--jt-transition);
}

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

/* Hamburger mobile */
.jt-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.jt-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.jt-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jt-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.jt-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MAIN CONTENT ────────────────────────────────────────────────────────── */

#jt-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#jt-content {
  flex: 1;
}

/* Page full-width (shortcodes plugin) */
.jt-page-content {
  padding-top: var(--jt-header-h);
}

/* Fix: les sections du plugin doivent être full-width */
.jt-page-content .jt-hero,
.jt-page-content .jt-single-page,
.jt-page-content .jt-listing-page {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}

/* Pour les pages sans shortcode plugin (blog, etc.) */
.jt-entry-wrap {
  max-width: var(--jt-max-width);
  margin: 0 auto;
  padding: calc(var(--jt-header-h) + 48px) 32px 80px;
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */

#jt-footer {
  background: var(--jt-black);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
}

.jt-footer-inner {
  max-width: var(--jt-max-width);
  margin: 0 auto;
  padding: 48px 32px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.jt-footer-brand .jt-logo-text {
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: block;
}

.jt-footer-brand p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
  margin-bottom: 20px;
}

.jt-footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.jt-footer-socials a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all var(--jt-transition);
}

.jt-footer-socials a:hover {
  background: var(--jt-accent);
  color: #fff;
}

.jt-footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}

.jt-footer-col ul { list-style: none; padding: 0; margin: 0; }

.jt-footer-col li {
  margin-bottom: 10px;
}

.jt-footer-col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--jt-transition);
}

.jt-footer-col a:hover { color: #fff; }

.jt-footer-col address {
  font-style: normal;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}

.jt-footer-col address strong {
  color: rgba(255,255,255,0.85);
}

.jt-footer-bar {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 100%;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

.jt-footer-bar a { color: rgba(255,255,255,0.45); transition: color var(--jt-transition); }
.jt-footer-bar a:hover { color: var(--jt-accent); }

.jt-footer-bar-links { display: flex; gap: 20px; }

/* ── PAGE 404 ────────────────────────────────────────────────────────────── */

.jt-404-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.jt-404-code {
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 1;
  color: var(--jt-grey-200);
  letter-spacing: -0.05em;
  margin-bottom: 16px;
}

.jt-404-section h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--jt-black);
}

.jt-404-section p {
  color: var(--jt-grey-600);
  margin-bottom: 32px;
  font-size: 1rem;
}

.jt-404-section .jt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--jt-accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--jt-transition);
}

.jt-404-section .jt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204,0,0,0.3);
}

/* ── BLOG (index.php) ────────────────────────────────────────────────────── */

.jt-blog-header {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
  padding: calc(var(--jt-header-h) + 60px) 32px 60px;
  text-align: center;
  color: #fff;
}

.jt-blog-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.jt-posts-grid {
  max-width: var(--jt-max-width);
  margin: 48px auto;
  padding: 0 32px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.jt-post-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--jt-grey-200);
  transition: transform var(--jt-transition), box-shadow var(--jt-transition);
}

.jt-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.jt-post-card__img { aspect-ratio: 16/9; overflow: hidden; }
.jt-post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.jt-post-card:hover .jt-post-card__img img { transform: scale(1.05); }

.jt-post-card__body { padding: 24px; }

.jt-post-card__cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--jt-accent);
  margin-bottom: 8px;
}

.jt-post-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--jt-black);
  margin-bottom: 12px;
}

.jt-post-card__title a { color: inherit; transition: color var(--jt-transition); }
.jt-post-card__title a:hover { color: var(--jt-accent); }

.jt-post-card__excerpt {
  font-size: 0.875rem;
  color: var(--jt-grey-600);
  line-height: 1.6;
  margin-bottom: 20px;
}

.jt-post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--jt-grey-400);
}

.jt-post-card__read {
  color: var(--jt-accent);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .jt-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

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

  .jt-main-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: 4px;
    z-index: 9989;
    overflow-y: auto;
    align-items: flex-start;
  }

  .jt-main-nav.open a {
    font-size: 1.15rem;
    padding: 14px 16px;
    width: 100%;
  }

  .jt-header-inner { padding: 0 20px; }
}

@media (max-width: 640px) {
  .jt-footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 32px 24px; }
  .jt-footer-bar { flex-direction: column; text-align: center; padding: 16px 24px; }
  .jt-entry-wrap { padding: calc(var(--jt-header-h) + 32px) 20px 60px; }
}
