/* ============================================
   FitGear Pro - Site d'affiliation Sport & Fitness
   Design moderne, responsive, optimisé conversion
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --accent: #ff6b35;
  --accent-dark: #e55a2b;
  --dark: #1a1a2e;
  --gray-900: #212529;
  --gray-700: #495057;
  --gray-500: #6c757d;
  --gray-300: #dee2e6;
  --gray-100: #f8f9fa;
  --white: #ffffff;
  --success: #28a745;
  --warning: #ffc107;
  --star: #ffb400;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--gray-100);
}

a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

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

/* Header */
.header {
  background: var(--white);
  box-shadow: 0 1px 10px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ── Dropdown Navigation ─────────────────────────────────── */
.main-nav { display: flex; align-items: center; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(26,115,232,0.06);
}

.nav-link .arrow {
  font-size: 0.65rem;
  opacity: 0.5;
  transition: var(--transition);
}

.nav-item.has-dropdown { position: relative; }

.nav-item.has-dropdown:hover .arrow { opacity: 1; transform: rotate(180deg); }

/* Dropdown panel */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  list-style: none;
  padding: 16px 8px 8px;
  min-width: 230px;
  z-index: 200;
  border: 1px solid rgba(0,0,0,0.05);
}

/* Pont invisible qui comble le vide entre le lien et le menu */
.dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

/* Petite flèche décorative */
.dropdown::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--white);
  border-left: 1px solid rgba(0,0,0,0.05);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.dropdown li a {
  display: block;
  padding: 10px 16px;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition);
}

.dropdown li a:hover {
  background: rgba(26,115,232,0.06);
  color: var(--primary);
  padding-left: 20px;
}

.nav-item.has-dropdown:hover .dropdown { display: block; }

/* Mobile toggle button */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
  padding: 5px;
}

/* Mobile nav */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-300);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 12px;
    z-index: 150;
  }
  .main-nav.open { display: flex; flex-direction: column; align-items: stretch; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { font-size: 1rem; padding: 12px 16px; }
  .dropdown { display: none !important; }
  .mobile-toggle { display: block; }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  transition: var(--transition);
}

.hero-cta:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,107,53,0.4);
}

/* Trust Bar */
.trust-bar {
  background: var(--white);
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-300);
}

.trust-items {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--gray-500);
  font-weight: 500;
}

.trust-item .icon { font-size: 1.3rem; }

/* Section Styles */
.section { padding: 70px 0; }

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  text-align: center;
  margin-bottom: 15px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 50px;
  font-size: 1.05rem;
}

/* Category Cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 35px 25px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.category-icon { font-size: 2.5rem; margin-bottom: 15px; }

.category-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.category-card p { font-size: 0.9rem; color: var(--gray-500); }

/* Article Cards */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-img {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  position: relative;
}

.article-img.img-fitness { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.article-img.img-running { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.article-img.img-nutrition { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.article-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.article-content { padding: 25px; }

.article-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.article-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 15px;
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-more:hover { gap: 10px; }

/* Product Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 30px 0;
}

.comparison-table th {
  background: var(--dark);
  color: var(--white);
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.comparison-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray-300);
  font-size: 0.9rem;
}

.comparison-table tr:hover { background: rgba(26,115,232,0.04); }

.comparison-table .best-pick {
  background: rgba(40,167,69,0.08);
  border-left: 3px solid var(--success);
}

.stars { color: var(--star); letter-spacing: 2px; }

.price { font-weight: 700; color: var(--dark); font-size: 1.1rem; }

.btn-affiliate {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-affiliate:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.product-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--success);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.product-card .product-icon {
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 15px;
}

.product-card h3 { text-align: center; font-size: 1.05rem; color: var(--dark); margin-bottom: 8px; }

.product-card .product-rating { text-align: center; margin-bottom: 10px; }

.product-card .product-price { text-align: center; font-size: 1.3rem; font-weight: 800; color: var(--accent); margin-bottom: 5px; }

.product-card .product-features { list-style: none; margin: 15px 0; }

.product-card .product-features li {
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-card .btn-affiliate { display: block; text-align: center; margin-top: 15px; }

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
  padding: 60px 0;
  text-align: center;
  color: white;
}

.newsletter h2 { font-size: 1.8rem; margin-bottom: 10px; }
.newsletter p { margin-bottom: 25px; opacity: 0.9; }

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 10px;
}

.newsletter-form input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
}

.newsletter-form button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover { background: var(--accent-dark); }

/* Footer */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 50px 0 25px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 { color: white; font-size: 1rem; margin-bottom: 15px; }
.footer p { font-size: 0.85rem; line-height: 1.8; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer ul a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
}

/* Article Page Styles */
.article-hero {
  background: linear-gradient(135deg, var(--dark), #16213e);
  color: white;
  padding: 60px 0;
}

.article-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 15px; max-width: 800px; }
.article-hero .meta { font-size: 0.9rem; opacity: 0.7; }

.article-body {
  max-width: 850px;
  margin: -30px auto 50px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 50px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.article-body h2 {
  font-size: 1.5rem;
  color: var(--dark);
  margin: 40px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-100);
}

.article-body h3 { font-size: 1.2rem; color: var(--dark); margin: 25px 0 10px; }

.article-body p { margin-bottom: 18px; }

.article-body ul, .article-body ol {
  margin: 15px 0;
  padding-left: 25px;
}

.article-body li { margin-bottom: 8px; }

.info-box {
  background: rgba(26,115,232,0.08);
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 25px 0;
}

.info-box.tip { background: rgba(40,167,69,0.08); border-left-color: var(--success); }
.info-box.warning { background: rgba(255,193,7,0.1); border-left-color: var(--warning); }

.toc {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 30px;
}

.toc h4 { margin-bottom: 10px; color: var(--dark); }
.toc ol { padding-left: 20px; }
.toc li { margin-bottom: 5px; }
.toc a { color: var(--primary); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 50px 0; }
  .nav { display: none; }
  .mobile-menu { display: block; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-form { flex-direction: column; }
  .article-body { padding: 25px; margin: -20px 15px 30px; }
  .trust-items { gap: 20px; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 10px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
}
