:root {
  --bg: #0d0d0f;
  --bg2: #141418;
  --bg3: #1c1c23;
  --border: #2a2a35;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --text: #f0f0f5;
  --text2: #9999bb;
  --text3: #666688;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
}

.logo span { color: var(--accent2); }

.search-bar {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-bar input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 20px 10px 44px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input::placeholder { color: var(--text3); }
.search-bar input:focus { border-color: var(--accent); }

.search-bar svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  width: 18px;
  height: 18px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text2);
  transition: all 0.2s;
}

.header-nav a:hover { background: var(--bg3); color: var(--text); }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #0d0d0f 0%, #1a1040 50%, #0d0d0f 100%);
  padding: 72px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text2);
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent2);
}

.hero-stat span { font-size: 13px; color: var(--text3); }

/* ── CATEGORIES NAV ── */
.cats-wrap {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.cats-wrap::-webkit-scrollbar { display: none; }

.cats {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  height: 52px;
  align-items: center;
}

.cat-btn {
  white-space: nowrap;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
}

.cat-btn:hover { background: var(--bg3); color: var(--text); }

.cat-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── MAIN LAYOUT ── */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
}

.see-all {
  font-size: 13px;
  color: var(--accent2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.see-all:hover { background: var(--bg3); }

/* ── GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.grid-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.grid-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  background: var(--bg3);
}

/* Variante portrait (catégorie mobile) */
.grid.grid-portrait {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.grid.grid-portrait .grid-item img {
  aspect-ratio: 9 / 16;
}

.grid-item:hover img { transform: scale(1.04); }

.grid-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.grid-item:hover .grid-item-overlay { opacity: 1; }

.grid-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-item-actions {
  display: flex;
  gap: 8px;
}

.btn-dl {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-dl:hover { background: #5a52e8; }

.btn-dl svg { width: 14px; height: 14px; }

.res-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
}

/* ── CATEGORY CARDS ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 140px;
  cursor: pointer;
  transition: transform 0.2s;
}

.cat-card:hover { transform: translateY(-3px); }

.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

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

.cat-card-label {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.cat-card-label strong {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.cat-card-label span {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

/* ── WALLPAPER PAGE ── */
.wp-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.wp-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  position: relative;
}

.wp-img-wrap img { width: 100%; height: auto; }

.wp-sidebar {}

.wp-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.wp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 50px;
}

.dl-section { margin-bottom: 24px; }

.dl-section h3 { font-size: 13px; color: var(--text3); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.dl-options { display: flex; flex-direction: column; gap: 8px; }

.dl-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.dl-option:hover { border-color: var(--accent); }

.dl-option-info strong { font-size: 14px; }
.dl-option-info span { display: block; font-size: 12px; color: var(--text3); }

.dl-option-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ── HEADER AUTH ── */
.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-header-premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000 !important;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.btn-header-login {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2) !important;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.btn-header-login:hover { color: var(--text) !important; border-color: var(--accent2); }

/* ── WALLPAPER SEO DESC ── */
.wp-seo-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.wp-seo-desc strong { color: var(--text); }
.wp-seo-desc em { color: var(--accent2); font-style: normal; }

.dl-locked { opacity: 0.6; }

/* ── WALLPAPER PAGE MOBILE ── */
@media (max-width: 768px) {
  .wp-page {
    display: flex;
    flex-direction: column;
  }
  .wp-sidebar {
    order: -1;
    padding: 16px;
  }
  .wp-img-wrap {
    border-radius: 0;
  }
}

/* ── LEGAL PAGES ── */
.legal-content h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent2);
  margin: 28px 0 10px;
}
.legal-content p, .legal-content ul {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.8;
}
.legal-content ul { padding-left: 20px; }
.legal-content ul li { margin-bottom: 6px; }

/* ── PREMIUM BADGE ── */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}

.btn-premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── PREMIUM PAGE ── */
.premium-hero {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, #1a1040 0%, #0d0d0f 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 48px;
}

.premium-hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-hero p { color: var(--text2); font-size: 16px; margin-bottom: 24px; }

.premium-price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 50px;
}

.premium-price strong { font-size: 32px; font-weight: 800; color: #f59e0b; }
.premium-price span { color: var(--text3); font-size: 14px; }

.premium-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.premium-feature {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-icon { font-size: 24px; }
.premium-feature strong { font-size: 14px; font-weight: 700; }
.premium-feature span { font-size: 13px; color: var(--text2); }

.premium-checkout {
  text-align: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 48px;
}

.premium-checkout h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }

.btn-checkout {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-checkout:hover { opacity: 0.9; }
.btn-checkout:disabled { opacity: 0.6; cursor: not-allowed; }

.premium-compare { margin-bottom: 48px; }
.premium-compare h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th, .compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.compare-table th:first-child, .compare-table td:first-child { text-align: left; color: var(--text2); }
.compare-table th { color: var(--text3); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.compare-table .highlight { color: #f59e0b; background: rgba(245,158,11,0.05); }
.compare-table th.highlight { color: #f59e0b; }

/* ── LANG SWITCHER ── */
.lang-switcher {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.lang-switcher a {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  border: 1px solid transparent;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.lang-switcher a:hover { color: var(--text); background: var(--bg3); }
.lang-switcher a.active { color: var(--accent2); border-color: var(--border); background: var(--bg3); }

/* ── FOOTER ── */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p { color: var(--text3); font-size: 14px; margin-top: 12px; line-height: 1.7; }

.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin-bottom: 16px; }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text2); font-size: 14px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--text); }

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text3);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

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

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── LAZY LOAD ── */
.grid-item img[data-src] {
  opacity: 0;
  transition: opacity 0.4s;
}

.grid-item img.loaded {
  opacity: 1;
}

/* ── LOADER ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
  height: 280px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .wp-page { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hero { padding: 48px 16px; }
  .hero-stats { gap: 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .header-inner { gap: 16px; }
  .header-nav { display: none; }
}

/* ── CATEGORY INTRO ── */
.cat-intro-block { margin-bottom: 8px; }
.cat-intro-text { color: var(--text2); font-size: 15px; line-height: 1.7; max-width: 800px; margin-top: 12px; }

/* ── TRENDING TAGS ── */
.trending-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 0;
}
.trending-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  white-space: nowrap;
}
.trending-pill {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  color: var(--text2);
  background: var(--bg2);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.trending-pill:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
