/* =====================================================
   XTREM GARAGE — style.css
   V3: High-End Industrial / Tech Garage
   Fonts: loaded via <link> in header.php (Barlow Condensed + Inter)
   ===================================================== */

:root {
  --bg-base:      #090A0F;
  --bg-panel:     #14171E;
  --bg-panel-hov: #1B202A;
  
  --border-color: #2A303C;
  --border-light: #3D4554;
  
  --accent-blue:  #0055FF;
  --accent-volt:  #CCFF00;
  
  --text-main:    #FFFFFF;
  --text-muted:   #8B94A5;
  
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body:    'Inter', sans-serif;
  
  --radius-sm:    2px;
  --radius-md:    8px;
  --radius-lg:    16px;
  
  --shadow-float: 0 10px 40px rgba(0, 0, 0, 0.5);
  
  --container:    1300px;
  --trans:        0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; object-fit: cover; }
a { color: var(--accent-blue); text-decoration: none; transition: var(--trans); }
a:hover { color: var(--accent-volt); }
ul, ol { list-style: none; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: var(--text-main);
  line-height: 1.1;
  font-style: italic;
}
.text-volt { color: var(--accent-volt); }
.text-blue { color: var(--accent-blue); }

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: 0.02em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); font-weight: 700; }

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
}
.section-title::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background: var(--border-color);
}

/* ── BUTTONS & BADGES ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 28px;
  background: var(--accent-blue);
  color: var(--text-main);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transform: skewX(-10deg);
  transition: var(--trans);
}
.btn span { transform: skewX(10deg); display: block; }
.btn:hover { background: var(--accent-volt); color: #000; box-shadow: 0 0 20px rgba(204, 255, 0, 0.4); }

.btn-outline { background: transparent; border: 2px solid var(--border-light); }
.btn-outline:hover { border-color: var(--accent-blue); background: rgba(0, 85, 255, 0.1); color: var(--text-main); box-shadow: none; }

.badge {
  display: inline-flex; padding: 4px 12px; font-family: var(--font-heading); font-size: 0.9rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: var(--accent-blue);
  color: #fff; border-radius: var(--radius-sm); transform: skewX(-10deg);
}
.badge span { transform: skewX(10deg); display: block; }
.badge.badge-volt { background: var(--accent-volt); color: #000; }
.badge.badge-dark { background: var(--border-color); color: var(--text-main); }
.badge.badge-red { background: #E63946; color: #fff; }
.badge.badge-purple { background: #7C3AED; color: #fff; }
.badge.badge-orange { background: #F05C28; color: #fff; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(9, 10, 15, 0.9);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color);
}
.site-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0; height: 1px; width: 20%;
  background: linear-gradient(90deg, var(--accent-blue), transparent);
}
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px; height: 80px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-size: 2rem; font-weight: 900; font-style: italic; color: var(--text-main); letter-spacing: -0.02em; }
.logo span { color: var(--accent-blue); }
.logo img { height: 44px; width: auto; object-fit: contain; }

.main-nav ul { display: flex; align-items: center; gap: 32px; }
.main-nav a { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); position: relative; padding: 8px 0; }
.main-nav a:hover, .main-nav a.active { color: var(--text-main); }
.main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent-volt); transition: var(--trans); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

/* ── HERO 4-GRID (BENTO BOX) ── */
.hero-v3 {
  max-width: var(--container); margin: 40px auto 80px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 300px); gap: 24px;
}
.hero-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden; display: flex;
  flex-direction: column; justify-content: flex-end; border: 1px solid var(--border-color); transition: var(--trans);
}
.hero-card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--shadow-float); z-index: 10; }
.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hero-card:hover img { transform: scale(1.05); }
.hero-card-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,10,15,0.95) 0%, rgba(9,10,15,0.3) 60%, transparent 100%); }
.hero-card-content { position: relative; z-index: 2; padding: 32px; }

/* Grid Positions */
.hero-item-1 { grid-column: 1 / 3; grid-row: 1 / 3; }
.hero-item-2 { grid-column: 3 / 4; grid-row: 1 / 2; }
.hero-item-3 { grid-column: 4 / 5; grid-row: 1 / 2; }
.hero-item-4 { grid-column: 3 / 4; grid-row: 2 / 3; }
.hero-item-5 { grid-column: 4 / 5; grid-row: 2 / 3; }

.hero-item-1 .hero-card-content { padding: 48px; }
.hero-item-1 h2 { font-size: 3rem; margin: 16px 0; }
.hero-item-2 h3, .hero-item-3 h3, .hero-item-4 h3, .hero-item-5 h3 { font-size: 1.3rem; margin: 12px 0 0; }

.meta { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 500; }
.meta-auth { color: var(--text-main); }

/* Fallbacks layout to flex if not 4 articles */
.hero-v3.hero-fallback { display: flex; flex-direction: column; height: auto; }
.hero-v3.hero-fallback .hero-card { flex: 1; min-height: 400px; margin-bottom: 24px; }

/* ── ARTICLE GRID (LISTING) ── */
.content-section { max-width: var(--container); margin: 0 auto 80px; padding: 0 24px; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 24px; }
.art-card {
  background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 24px; display: flex; flex-direction: column; transition: var(--trans); position: relative;
}
.art-card::before {
  content: ''; position: absolute; top: -1px; left: 24px; right: 24px; height: 2px;
  background: var(--accent-blue); transform: scaleX(0); transition: var(--trans);
}
.art-card:hover { background: var(--bg-panel-hov); border-color: var(--border-light); transform: translateY(-4px); }
.art-card:hover::before { transform: scaleX(1); }

.art-card-img { width: 100%; height: 200px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 20px; }
.art-card-img img { transition: var(--trans); width: 100%; height: 100%; }
.art-card:hover .art-card-img img { transform: scale(1.05); }

.art-card-cat { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.art-card h3 { font-size: 1.4rem; margin-bottom: 12px; line-height: 1.25; }
.art-card h3 a { color: var(--text-main); }
.art-card h3 a:hover { color: var(--accent-blue); }
.art-card p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; flex-grow: 1; }

.art-num { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: var(--border-color); font-style: italic; line-height: 1; }
.view-all-link { color: var(--accent-blue); font-family: var(--font-heading); font-size: 1.2rem; text-transform: uppercase; font-style: italic; display: inline-flex; align-items: center; gap: 8px; }
.view-all-link:hover { color: var(--accent-volt); }

/* ── FOOTER ── */
.site-footer { background: var(--bg-panel); border-top: 1px solid var(--border-color); padding: 80px 0 40px; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 60px; }
.footer-logo { font-size: 2.5rem; margin-bottom: 16px; }
.footer-logo img { height: 54px; }
.footer-desc { max-width: 300px; font-size: 0.95rem; }
.footer-title { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 24px; color: var(--text-main); }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-volt); }
.footer-bottom { max-width: var(--container); margin: 0 auto; padding: 24px 24px 0; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--text-muted); }

/* ── CATEGORY PAGE TOP ── */
.cat-hero { background: var(--bg-panel); border-bottom: 1px solid var(--border-color); padding: 80px 24px; text-align: center; margin-bottom: 60px; position: relative; overflow: hidden; }

/* ── CATEGORY FEATURED CARD (dernier article épinglé) ── */
.cat-featured-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-color); transition: var(--trans); }
.cat-featured-card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--shadow-float); }
.cat-featured-img { height: 380px; overflow: hidden; }
.cat-featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2,0.8,0.2,1); }
.cat-featured-card:hover .cat-featured-img img { transform: scale(1.04); }
.cat-featured-body { background: var(--bg-panel); padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.cat-featured-body .badge { margin-bottom: 16px; align-self: flex-start; }
.cat-featured-body h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 16px; color: var(--text-main); }
.cat-featured-body p { font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); }

/* ── CAT NAV GRID (autres catégories) ── */
.cat-nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-nav-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); transition: var(--trans); }
.cat-nav-card:hover { border-color: var(--accent-blue); background: var(--bg-panel-hov); transform: translateY(-3px); }
.cat-nav-label { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; font-style: italic; text-transform: uppercase; color: var(--text-main); transition: var(--trans); }
.cat-nav-card:hover .cat-nav-label { color: var(--accent-blue); }
.cat-nav-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

/* ── UI BITS (PANELS) ── */
.panel { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 32px; }
.info-block p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }

/* ── STATS ROW ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 32px;}
.stat-box { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-num { font-family: var(--font-heading); font-size: 3rem; font-weight: 900; color: var(--text-main); font-style: italic; line-height: 1; }
.stat-label { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; margin-top: 8px; }

/* ── TEAM ── */
.team-card { display: flex; gap: 32px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 32px; align-items: flex-start; }
.team-avatar { width: 140px; height: 140px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; }
.team-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: var(--border-color); color: var(--text-muted); font-family: var(--font-heading); font-size: 4rem; font-weight: 900; }
.team-info h3 { font-size: 2rem; margin-bottom: 4px; }
.team-role { display: block; font-size: 1rem; color: var(--accent-blue); font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-heading); font-style: italic; }
.team-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ── FORM ── */
.form-v3 { display: flex; flex-direction: column; gap: 24px; padding: 40px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); margin: 0 auto; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-family: var(--font-heading); font-size: 1.1rem; text-transform: uppercase; color: var(--text-main); font-weight: 600; }
.form-v3 input, .form-v3 select, .form-v3 textarea { background: var(--bg-base); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--text-main); font-family: var(--font-body); font-size: 1rem; transition: var(--trans); }
.form-v3 input:focus, .form-v3 select:focus, .form-v3 textarea:focus { border-color: var(--accent-blue); outline: none; box-shadow: 0 0 0 2px rgba(0, 85, 255, 0.2); }
.form-v3 textarea { resize: vertical; min-height: 120px; }

/* ── ERROR 404 ── */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 40px; }
.error-code { font-family: var(--font-heading); font-size: clamp(6rem, 15vw, 12rem); font-weight: 900; font-style: italic; color: var(--border-color); line-height: 0.8; margin-bottom: 24px; }

/* ── ARTICLE PAGE ── */
.article-hero { position: relative; margin: 40px auto; max-width: var(--container); min-height: 500px; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-color); }
.article-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,10,15,0.95) 0%, rgba(9,10,15,0.6) 50%, rgba(9,10,15,0.2) 100%); }
.article-hero-content { position: relative; z-index: 2; max-width: 900px; }
.breadcrumb { display: flex; gap: 8px; font-family: var(--font-heading); font-size: 1rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-blue); }
.article-hero-tags { display: flex; gap: 8px; margin-bottom: 16px; }
.article-hero-sub { font-size: 1.2rem; color: var(--text-muted); margin-top: 16px; max-width: 800px; }
.article-hero-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; border-top: 1px solid var(--border-color); padding-top: 24px; }
.author-pill { display: flex; align-items: center; gap: 12px; }
.author-pill img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.author-pill strong { display: block; color: var(--text-main); font-weight: 600; }
.author-pill span { display: block; color: var(--text-muted); font-size: 0.85rem; }

.article-layout { max-width: var(--container); margin: 0 auto 80px; padding: 0 24px; display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }
.toc { margin: 32px 0; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--accent-volt); }
.article-body { font-size: 1.1rem; line-height: 1.8; color: var(--text-muted); }
.article-body h2 { font-size: 2.2rem; margin: 48px 0 24px; color: var(--text-main); }
.article-body h3 { font-size: 1.6rem; margin: 32px 0 16px; color: var(--text-main); }
.article-body p { margin-bottom: 24px; }
.article-body strong { color: var(--text-main); }
.article-body figure { margin: 40px 0; }
.article-body figure img { border-radius: var(--radius-md); border: 1px solid var(--border-color); width: 100%; height: auto; }
.article-body figcaption { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-top: 12px; font-style: italic; }

.data-table { width: 100%; border-collapse: collapse; margin: 32px 0; }
.data-table th, .data-table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border-color); }
.data-table th { background: var(--bg-panel); font-family: var(--font-heading); font-size: 1.2rem; text-transform: uppercase; color: var(--text-main); }

.faq-list { display: flex; flex-direction: column; gap: 16px; margin: 32px 0; }
.faq-item { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 24px; }
.faq-item summary { font-family: var(--font-heading); font-size: 1.4rem; color: var(--text-main); font-style: italic; font-weight: 700; cursor: pointer; text-transform: uppercase; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin-top: 16px; margin-bottom: 0; }

.author-box { display: flex; gap: 24px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 32px; margin-top: 64px; }
.author-box-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.sidebar-sticky { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 32px; }
.sidebar-link { display: block; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.sidebar-link:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-link:first-of-type { padding-top: 0; }
.sidebar-link-title { display: block; font-weight: 600; color: var(--text-muted); line-height: 1.4; transition: var(--trans); }
.sidebar-link-meta { display: block; font-size: 0.8rem; color: var(--border-light); margin-top: 4px; font-family: var(--font-heading); font-style: italic; text-transform: uppercase; letter-spacing: 0.03em; }
.sidebar-link:hover .sidebar-link-title { color: var(--accent-blue); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-v3 { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .hero-item-1 { grid-column: 1 / 3; grid-row: 1; min-height: 400px; }
  .hero-item-2 { grid-column: 1; grid-row: 2; min-height: 250px; }
  .hero-item-3 { grid-column: 2; grid-row: 2; min-height: 250px; }
  .hero-item-4 { grid-column: 1; grid-row: 3; min-height: 250px; }
  .hero-item-5 { grid-column: 2; grid-row: 3; min-height: 250px; }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  .article-layout { grid-template-columns: 1fr; }
  .cat-featured-card { grid-template-columns: 1fr; }
  .cat-featured-img { height: 280px; }
  .cat-nav-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .hero-item-2, .hero-item-3, .hero-item-4, .hero-item-5 { grid-column: 1 / 3; }
  .hero-item-3 { grid-row: 3; }
  .hero-item-4 { grid-row: 4; }
  .hero-item-5 { grid-row: 5; }
  .article-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .cat-nav-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-featured-body { padding: 24px; }
  
  /* Additional V3 responsive */
  .team-card { flex-direction: column; align-items: center; text-align: center; }
  .article-hero { padding: 32px 24px; }
  .article-hero-meta { flex-direction: column; align-items: flex-start; gap: 16px; }
  .author-box { flex-direction: column; align-items: center; text-align: center; }
}
