/*
Theme Name: Asphalt.ma
Theme URI: https://asphalt.ma
Author: Asphalt.ma
Author URI: https://asphalt.ma
Description: Thème custom premium pour Asphalt.ma — Drive the culture. Média automobile marocain.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: asphalt
*/

/* =============================================
   ASPHALT.MA — THEME CSS
   Drive the culture
   ============================================= */

:root {
  --noir: #0A0A0A;
  --charbon: #141414;
  --charbon2: #1a1a1a;
  --jaune: #F5C518;
  --vert: #1B4332;
  --vert-light: #2D6A4F;
  --blanc: #F0F0F0;
  --gris: #9A9A9A;
  --gris-dark: #555;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--noir);
  color: var(--blanc);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--jaune); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blanc); }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.clearfix::after { content: ''; display: table; clear: both; }

/* ===== HEADER ===== */
#masthead {
  background: var(--noir);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--jaune);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 70px;
  gap: 48px;
}

/* Logo */
.site-branding {
  flex-shrink: 0;
}

.site-branding a {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.site-branding img {
  height: 40px;
  width: auto;
}

.site-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blanc);
  line-height: 1;
}

.site-name .dot-ma {
  color: var(--jaune);
  font-size: 16px;
  letter-spacing: 1px;
}

/* Navigation */
#primary-nav {
  display: flex;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-menu li { position: relative; }

.nav-menu > li > a {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gris);
  padding: 26px 14px;
  transition: color .2s;
  position: relative;
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--jaune);
  transform: scaleX(0);
  transition: transform .3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a {
  color: var(--blanc);
}

.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Dropdown */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--charbon);
  border-top: 2px solid var(--jaune);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .25s ease;
  z-index: 100;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu li a {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gris);
  padding: 12px 20px;
  border-bottom: 1px solid #222;
  transition: all .2s;
}

.nav-menu .sub-menu li a:hover {
  color: var(--jaune);
  background: #1f1f1f;
  padding-left: 26px;
}

/* Mobile burger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--jaune);
  transition: all .3s;
}

/* ===== SLOGAN BAND ===== */
.slogan-band {
  background: var(--vert);
  padding: 7px 0;
  text-align: center;
}

.slogan-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}

/* ===== HERO SECTION ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3px;
  background: #111;
  min-height: 520px;
}

.hero-main {
  position: relative;
  overflow: hidden;
  background: var(--charbon);
  min-height: 520px;
}

.hero-main .post-thumbnail {
  position: absolute;
  inset: 0;
}

.hero-main .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.hero-main:hover .post-thumbnail img {
  transform: scale(1.03);
}

.hero-main .overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.4) 50%, rgba(0,0,0,.1) 100%);
  z-index: 1;
}

.hero-main .hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 40px;
  z-index: 2;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-side-card {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--charbon);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: background .2s;
  min-height: 170px;
}

.hero-side-card .post-thumbnail {
  position: absolute;
  inset: 0;
}

.hero-side-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .4;
  transition: opacity .3s, transform .4s;
}

.hero-side-card:hover .post-thumbnail img {
  opacity: .55;
  transform: scale(1.04);
}

.hero-side-card .overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 100%);
  z-index: 1;
}

.hero-side-card .card-content {
  position: relative;
  z-index: 2;
}

.hero-side-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--jaune);
  transform: scaleY(0);
  transition: transform .3s;
  z-index: 3;
}

.hero-side-card:hover::before { transform: scaleY(1); }

/* ===== CATEGORY TAGS ===== */
.cat-tag {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 4px 12px;
  margin-bottom: 12px;
  background: var(--jaune);
  color: var(--noir);
  text-decoration: none;
  transition: background .2s;
}

.cat-tag:hover { background: #e0b214; color: var(--noir); }

.cat-tag.vert {
  background: var(--vert-light);
  color: var(--blanc);
}

.cat-tag.outline {
  background: transparent;
  border: 1px solid var(--jaune);
  color: var(--jaune);
}

/* ===== POST TITLES ===== */
.entry-title,
.post-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: .5px;
}

.hero-title {
  font-size: 42px;
  color: var(--blanc);
  margin-bottom: 12px;
}

.hero-title a { color: var(--blanc); }
.hero-title a:hover { color: var(--jaune); }

.side-title {
  font-size: 18px;
  color: var(--blanc);
  margin-bottom: 8px;
}

.side-title a { color: var(--blanc); }
.side-title a:hover { color: var(--jaune); }

/* ===== POST META ===== */
.post-meta {
  color: var(--gris);
  font-size: 12px;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-meta a { color: var(--gris); }
.post-meta a:hover { color: var(--jaune); }
.post-meta .sep { color: var(--gris-dark); }

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 0;
}

.section-bar {
  width: 4px;
  height: 26px;
  background: var(--jaune);
  flex-shrink: 0;
}

.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blanc);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #2a2a2a, transparent);
}

.section-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--jaune);
}

/* ===== ARTICLE CARDS ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.posts-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.post-card {
  background: var(--charbon);
  overflow: hidden;
  transition: transform .25s ease;
  position: relative;
}

.post-card:hover { transform: translateY(-4px); }

.post-card .card-thumb {
  position: relative;
  overflow: hidden;
  height: 190px;
  background: var(--charbon2);
}

.post-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.post-card:hover .card-thumb img { transform: scale(1.06); }

.post-card .card-thumb .cat-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  margin-bottom: 0;
  z-index: 1;
}

.post-card .card-body {
  padding: 20px;
}

.post-card .card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--blanc);
  margin-bottom: 10px;
}

.post-card .card-title a { color: var(--blanc); }
.post-card .card-title a:hover { color: var(--jaune); }

.post-card .card-excerpt {
  color: var(--gris);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.post-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #222;
  padding-top: 14px;
}

.card-date {
  color: var(--gris-dark);
  font-size: 11px;
  letter-spacing: .5px;
}

.read-more {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--jaune);
}

.read-more:hover { color: var(--blanc); }

/* ===== FEATURED BAND (Collections / Vert) ===== */
.band-vert {
  background: var(--vert);
  padding: 52px 0;
  margin: 0;
}

.band-vert .section-title { color: var(--blanc); }
.band-vert .section-bar { background: var(--jaune); }
.band-vert .post-card { background: rgba(0,0,0,.35); }
.band-vert .post-card:hover { background: rgba(0,0,0,.5); }

/* ===== CONTENT SECTIONS ===== */
.content-section {
  padding: 52px 0;
}

/* ===== SINGLE POST ===== */
.single-hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  margin-bottom: 0;
}

.single-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-hero .overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 60%);
}

.single-hero .single-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px;
  z-index: 2;
}

.single-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 52px;
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--blanc);
  max-width: 800px;
  margin-bottom: 16px;
}

.post-content-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 48px 0;
}

.entry-content {
  color: var(--blanc);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

.entry-content h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 28px;
  text-transform: uppercase;
  color: var(--blanc);
  margin: 36px 0 16px;
  padding-left: 16px;
  border-left: 3px solid var(--jaune);
}

.entry-content h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--blanc);
  margin: 28px 0 12px;
}

.entry-content p { margin-bottom: 20px; color: #ccc; }

.entry-content a { color: var(--jaune); border-bottom: 1px solid rgba(245,197,24,.3); }
.entry-content a:hover { color: var(--blanc); border-color: var(--blanc); }

.entry-content blockquote {
  border-left: 4px solid var(--jaune);
  padding: 20px 24px;
  margin: 28px 0;
  background: var(--charbon);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--blanc);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.entry-content ul, .entry-content ol {
  padding-left: 20px;
  margin-bottom: 20px;
  color: #ccc;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 8px; }

.entry-content img {
  width: 100%;
  height: auto;
  margin: 24px 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: 90px;
}

.widget {
  background: var(--charbon);
  padding: 24px;
  margin-bottom: 24px;
}

.widget-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--jaune);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #222;
}

/* Widget recent posts */
.widget-post {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #222;
}

.widget-post:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.widget-post-thumb {
  width: 70px;
  height: 55px;
  flex-shrink: 0;
  overflow: hidden;
}

.widget-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-post-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--blanc);
  margin-bottom: 6px;
}

.widget-post-title a { color: var(--blanc); }
.widget-post-title a:hover { color: var(--jaune); }
.widget-post-date { font-size: 11px; color: var(--gris-dark); }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 48px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  background: var(--charbon);
  color: var(--gris);
  transition: all .2s;
}

.pagination a:hover,
.pagination .current {
  background: var(--jaune);
  color: var(--noir);
}

/* ===== FOOTER ===== */
#colophon {
  background: #050505;
  border-top: 1px solid #111;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 52px 0 40px;
}

.footer-brand .site-name {
  font-size: 24px;
  margin-bottom: 14px;
  display: block;
}

.footer-brand p {
  color: var(--gris);
  font-size: 13px;
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--jaune);
  margin-bottom: 18px;
}

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

.footer-col ul li a {
  color: var(--gris);
  font-size: 13px;
  transition: color .2s, padding-left .2s;
}

.footer-col ul li a:hover {
  color: var(--blanc);
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid #111;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #444;
  font-size: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 1px;
}

.footer-bottom a { color: #444; }
.footer-bottom a:hover { color: var(--jaune); }

/* ===== ARCHIVE / CATEGORY PAGE ===== */
.archive-header {
  background: var(--charbon);
  padding: 48px 0;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--jaune);
}

.archive-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 48px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blanc);
}

.archive-title span { color: var(--jaune); }

/* ===== NO THUMBNAIL PLACEHOLDER ===== */
.no-thumb {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--vert) 0%, var(--noir) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: .4;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .post-content-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .hero-title { font-size: 28px; }
  .single-title { font-size: 32px; }

  .nav-menu { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: var(--charbon); border-top: 2px solid var(--jaune); padding: 16px 0; }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { padding: 14px 24px; }
  .nav-menu > li > a::after { display: none; }

  .menu-toggle { display: flex; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .single-hero { height: 300px; }
  .single-hero .single-hero-content { padding: 24px; }
}
