/* ============================
   BATTLES IA — Component Styles
   v7.0.0
   ============================ */

/* ── Battle Listing Grid ── */
.battle-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) {
  .battle-listing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .battle-listing-grid { grid-template-columns: 1fr; }
}

/* ── Battle Card (listing) ── */
.battle-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
}
.battle-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
}
.battle-card-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.battle-card-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #1E1B4B;
}
.battle-card-vs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.battle-card-cat {
  font-size: 12px;
  color: #6C3AED;
  font-weight: 500;
  text-align: center;
  padding: 2px 10px;
  background: rgba(108, 58, 237, 0.08);
  border-radius: 100px;
  align-self: center;
}
.battle-card-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
}
.battle-card-score {
  font-weight: 600;
  color: #6B7280;
}
.battle-card-score-win {
  color: #6C3AED;
}
.battle-card-winner {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #10B981;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 8px;
}
.battle-card-draw {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.08);
}
.battle-card-link {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #6C3AED;
  margin-top: auto;
}
.battle-count-badge {
  background: rgba(249, 115, 22, 0.12) !important;
  color: #F97316 !important;
}

/* ── VS Header (single page) ── */
.battle-vs-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
}
.battle-vs-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}
.battle-tool-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  border: 2px solid #E5E7EB;
  background: white;
  padding: 4px;
}
.battle-tool-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid #E5E7EB;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.battle-vs-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #1E1B4B;
}
.battle-vs-score {
  font-size: 16px;
  font-weight: 600;
  color: #6B7280;
}
.battle-tool-winner .battle-vs-score {
  color: #6C3AED;
}
.battle-tool-winner::after {
  content: '🏆 Gagnant';
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  font-size: 12px;
  font-weight: 600;
}
.battle-vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}

/* ── Criteria Comparison Section ── */
.battle-criteria-section {
  padding: 56px 40px;
  background: #FAFAFE;
}
.battle-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1E1B2E;
  text-align: center;
  margin: 0 0 32px;
  letter-spacing: -0.5px;
}
.battle-criteria-header {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 12px;
  padding: 0 0 16px;
  border-bottom: 2px solid #E5E7EB;
  margin-bottom: 8px;
}
.battle-criteria-header-name {
  font-weight: 700;
  font-size: 14px;
  color: #1E1B4B;
  text-align: center;
}
.battle-criteria-header-label {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9B97AD;
  text-align: center;
}
.battle-criteria-row {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #F3F1FA;
}
.battle-criteria-score-left {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.battle-criteria-score-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.battle-criteria-label {
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: #4B5563;
}
.battle-criteria-val {
  font-weight: 700;
  font-size: 15px;
  color: #6B7280;
  min-width: 30px;
  text-align: center;
}
.battle-score-win .battle-criteria-val {
  color: #6C3AED;
}
.battle-score-draw .battle-criteria-val {
  color: #F59E0B;
}
.battle-criteria-bar {
  flex: 1;
  max-width: 200px;
  height: 8px;
  background: #F3F1FA;
  border-radius: 4px;
  overflow: hidden;
}
.battle-criteria-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.battle-fill-a {
  background: linear-gradient(90deg, #8B5CF6, #6C3AED);
  float: right;
}
.battle-fill-b {
  background: linear-gradient(90deg, #F97316, #FB923C);
}

/* ── Criteria Total ── */
.battle-criteria-total {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 20px 0 0;
  margin-top: 8px;
  border-top: 2px solid #E5E7EB;
}
.battle-criteria-total-score {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #6B7280;
}
.battle-total-win {
  color: #6C3AED;
}
.battle-criteria-total-label {
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9B97AD;
}

/* ── Verdict Section ── */
.battle-verdict-section {
  padding: 56px 40px;
}
.battle-verdict-card {
  background: linear-gradient(135deg, rgba(108, 58, 237, 0.04), rgba(249, 115, 22, 0.04));
  border: 2px solid rgba(108, 58, 237, 0.12);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}
.battle-verdict-winner {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1E1B4B;
  margin-bottom: 16px;
}
.battle-verdict-text {
  font-size: 15px;
  line-height: 1.7;
  color: #4B5563;
  text-align: left;
}
.battle-verdict-text p { margin: 0 0 12px; }

/* ── Quick Comparison Table ── */
.battle-table-section {
  padding: 0 40px 56px;
}
.battle-table {
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
}
.battle-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid #F3F1FA;
}
.battle-table-row:last-child { border-bottom: none; }
.battle-table-header {
  background: #F8F7FF;
  border-bottom: 2px solid #E5E7EB;
}
.battle-table-cell {
  padding: 14px 20px;
  font-size: 14px;
  color: #4B5563;
  text-align: center;
}
.battle-table-label {
  font-weight: 600;
  color: #1E1B4B;
  text-align: left;
}
.battle-table-header .battle-table-cell {
  font-weight: 700;
  color: #1E1B4B;
  font-size: 13px;
}

/* ── CTA Buttons ── */
.battle-cta-btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  transition: all 0.2s;
}
.battle-cta-a {
  background: #6C3AED;
  color: white !important;
}
.battle-cta-a:hover {
  background: #5B21B6;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(108, 58, 237, 0.3);
}
.battle-cta-b {
  background: #F97316;
  color: white !important;
}
.battle-cta-b:hover {
  background: #EA580C;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

/* ── Editorial content styling ── */
.battle-editorial-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1E1B2E;
  margin: 32px 0 12px;
}
.battle-editorial-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1E1B4B;
  margin: 24px 0 8px;
}
.battle-editorial-content p {
  font-size: 15px;
  line-height: 1.7;
  color: #4B5563;
  margin: 0 0 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .battle-vs-header {
    gap: 20px;
  }
  .battle-vs-badge {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  .battle-vs-name {
    font-size: 16px;
  }
  .battle-tool-logo,
  .battle-tool-logo-placeholder {
    width: 48px;
    height: 48px;
  }
  .battle-criteria-header,
  .battle-criteria-row,
  .battle-criteria-total {
    grid-template-columns: 1fr 80px 1fr;
    gap: 8px;
  }
  .battle-criteria-bar {
    max-width: 100px;
  }
  .battle-criteria-section,
  .battle-verdict-section,
  .battle-table-section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .battle-card-vs {
    flex-direction: column;
    gap: 8px;
  }
  .battle-card-tool {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .battle-vs-header {
    flex-direction: column;
    gap: 16px;
  }
  .battle-criteria-header,
  .battle-criteria-row,
  .battle-criteria-total {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .battle-criteria-score-left,
  .battle-criteria-score-right {
    justify-content: center;
  }
  .battle-criteria-bar {
    max-width: none;
    width: 100%;
  }
  .battle-fill-a {
    float: none;
  }
  .battle-table-row {
    grid-template-columns: 1fr;
  }
  .battle-table-cell {
    text-align: left;
    border-bottom: 1px solid #F3F1FA;
  }
  .battle-cta-btn {
    width: 100%;
    text-align: center;
  }
}
