/* ===========================
   TOP NAV — partagé entre les 3 pages
   =========================== */
:root {
  --nav-h: 60px;
}

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.topnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

.topnav-brand {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  margin-right: 2rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.topnav-brand i {
  color: #f59e0b;
}

.topnav-brand:hover { text-decoration: none; color: #fff; }

.topnav-links {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav-links::-webkit-scrollbar { display: none; }

.topnav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.1rem;
  height: var(--nav-h);
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.topnav-link:hover {
  color: #f1f5f9;
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}

.topnav-link.active {
  color: #fff;
  border-bottom-color: #6366f1;
  background: rgba(99,102,241,0.06);
}

.topnav-link i { font-size: 0.85rem; }

/* Séparateur */
.topnav-sep {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.5rem;
  flex-shrink: 0;
}

/* Badge page */
.topnav-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tnb-oss    { background: rgba(99,102,241,0.2);  color: #818cf8; }
.tnb-t3     { background: rgba(245,158,11,0.2);  color: #fbbf24; }
.tnb-ai     { background: rgba(34,197,94,0.2);   color: #4ade80; }

/* Push down page content to account for fixed nav */
body { padding-top: var(--nav-h); }

/* ===========================
   SHARED PAGE HEADER (pour typo3 et vibe-coding)
   =========================== */
.page-hero {
  background: var(--bg-dark, #0f172a);
  color: #f1f5f9;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-hero .accent { 
  background: linear-gradient(135deg, #f59e0b, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: 1rem;
  color: #94a3b8;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* ===========================
   RESPONSIVE NAV
   =========================== */
@media (max-width: 768px) {
  .topnav-brand span { display: none; }
  .topnav-link { padding: 0 0.7rem; font-size: 0.76rem; }
  .topnav-sep { margin: 0 0.2rem; }
}

@media (max-width: 480px) {
  .topnav-inner { padding: 0 0.75rem; }
  .topnav-brand { margin-right: 0.75rem; }
  .topnav-badge { display: none; }
}

/* ===========================
   COMPARISON TABLE (partagé)
   =========================== */
.comp-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
}

.comp-table thead tr {
  background: #0f172a;
  color: #f1f5f9;
}

.comp-table th {
  padding: 0.9rem 1.1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comp-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.12s;
}
.comp-table tbody tr:hover { background: #f8fafc; }
.comp-table td { padding: 0.85rem 1.1rem; vertical-align: top; }

.comp-table td:first-child { font-weight: 700; color: #1e293b; }

.ct-good  { color: #166534; background: rgba(34,197,94,0.06); }
.ct-warn  { color: #92400e; background: rgba(245,158,11,0.06); }
.ct-bad   { color: #991b1b; background: rgba(239,68,68,0.06); }

/* Avantages / Inconvénients grid */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pc-col {
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.pc-col-pros {
  background: rgba(34,197,94,0.04);
  border-color: rgba(34,197,94,0.2);
}

.pc-col-cons {
  background: rgba(239,68,68,0.04);
  border-color: rgba(239,68,68,0.2);
}

.pc-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pc-col-pros h4 { color: #166534; }
.pc-col-cons h4 { color: #991b1b; }

.pc-col ul { list-style: none; padding: 0; }
.pc-col ul li {
  font-size: 0.84rem;
  color: #475569;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #e2e8f0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.45;
}
.pc-col ul li:last-child { border-bottom: none; }

.pc-col-pros li::before { content: "✓"; position: absolute; left: 0; color: #22c55e; font-weight: 700; }
.pc-col-cons li::before { content: "✗"; position: absolute; left: 0; color: #ef4444; font-weight: 700; }

/* Score badge */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}
.sb-5 { background: #dcfce7; color: #166534; }
.sb-4 { background: #d1fae5; color: #15803d; }
.sb-3 { background: #fef3c7; color: #ca8a04; }
.sb-2 { background: #ffedd5; color: #c2410c; }
.sb-1 { background: #fee2e2; color: #991b1b; }

@media (max-width: 768px) {
  .pros-cons-grid { grid-template-columns: 1fr; }
}
