/* -------------------------------------------------------------
   CVbyAI - Section Avis & Comparatifs (/fr/avis/)
   Global Review Stylesheet | High-Legibility | Modern Clean
------------------------------------------------------------- */
:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-focus: #94a3b8;
  
  --text-heading: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --success: #16a34a;
  --success-light: #f0fdf4;
  --success-border: #bbf7d0;

  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;

  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --max-width: 1140px;
  --nav-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--primary-hover);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* NAVBAR */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-heading);
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background-color: var(--primary);
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* BREADCRUMBS */
.breadcrumb-nav {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb-nav ol {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  flex-wrap: wrap;
}
.breadcrumb-nav li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--text-subtle);
}

/* HERO */
.review-hero {
  padding: 24px 0 32px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-neutral { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-light); }
.badge-success { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-danger { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-warning { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-primary { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }

.review-title {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.22;
  color: var(--text-heading);
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.review-dek {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 900px;
  margin-bottom: 24px;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 36px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* SCORE SUMMARY CARD */
.score-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: center;
}

.score-badge-main {
  text-align: center;
  padding: 24px;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, #ffffff 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.score-number {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-heading);
}
.score-max {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
}

.score-stars {
  color: #f59e0b;
  font-size: 1.2rem;
  margin: 10px 0 6px;
}

.score-verdict-label {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-top: 6px;
}

.score-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.92rem;
}

.metric-label {
  font-weight: 600;
  color: var(--text-heading);
  min-width: 170px;
}

.metric-bar-bg {
  flex: 1;
  height: 8px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.metric-val {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-width: 45px;
  text-align: right;
}

/* PROS & CONS */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 36px 0;
}

.pro-con-box {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid;
}

.pro-con-box.pros {
  background-color: var(--success-light);
  border-color: var(--success-border);
}

.pro-con-box.cons {
  background-color: var(--danger-light);
  border-color: var(--danger-border);
}

.pro-con-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-con-box.pros .pro-con-title { color: var(--success); }
.pro-con-box.cons .pro-con-title { color: var(--danger); }

.pro-con-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
}

.pro-con-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pro-con-list li i {
  margin-top: 4px;
  flex-shrink: 0;
}

/* ARTICLE CONTENT */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin-bottom: 60px;
}

.article-body {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-xs);
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
}

.article-body h2:first-of-type {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 24px 0 12px;
}

.article-body p {
  margin-bottom: 18px;
  font-size: 1rem;
  color: var(--text-body);
}

.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ALERT BOXES */
.alert-box {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  border-left: 4px solid;
  font-size: 0.95rem;
}

.alert-warning {
  background-color: var(--warning-light);
  border-color: var(--warning);
  color: #92400e;
}

.alert-danger {
  background-color: var(--danger-light);
  border-color: var(--danger);
  color: #991b1b;
}

.alert-tip {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: #1e40af;
}

.alert-title {
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* COMPARISON TABLE */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-heading);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .highlight-col {
  background-color: var(--primary-light);
  font-weight: 600;
  color: var(--primary);
}

/* CTA BANNER */
.cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 40px 0;
  text-align: center;
}

.cta-banner h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #ffffff;
}

.cta-banner p {
  color: #cbd5e1;
  font-size: 1.02rem;
  max-width: 650px;
  margin: 0 auto 24px;
}

.btn-cta-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
  color: #0f172a !important;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}
.btn-cta-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background-color: #f8fafc;
}

/* SIDEBAR WIDGETS */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-sticky {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.sidebar-widget-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.toc-list a {
  color: var(--text-muted);
  display: block;
  transition: color 0.15s;
}
.toc-list a:hover {
  color: var(--primary);
}

.alt-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alt-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

/* FAQ ACCORDION */
.faq-section {
  margin-top: 36px;
}

.faq-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 20px;
  font-size: 0.94rem;
  color: var(--text-body);
  line-height: 1.65;
}

/* HUB / GRID STYLES */
.hub-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

.hub-title {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.hub-dek {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.competitor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
}

.competitor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #f59e0b;
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.card-summary {
  font-size: 0.92rem;
  color: var(--text-body);
  margin-bottom: 16px;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.card-action {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 0.88rem;
  font-weight: 600;
}

/* FOOTER */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 50px 0 30px;
  margin-top: 80px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-heading {
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

/* RESPONSIVE DESIGN - TABLET & MOBILE */
@media (max-width: 992px) {
  .score-summary-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .article-layout {
    display: flex;
    flex-direction: column;
    gap: 36px;
  }
  .article-sidebar {
    order: 2; /* Sidebar placed after article on mobile and tablet */
  }
  .sidebar-sticky {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 58px;
  }

  /* GLOBAL CONTAINER */
  .container {
    padding: 0 16px;
  }

  /* NAVBAR MOBILE */
  .site-header {
    height: 58px;
  }
  .navbar {
    gap: 8px;
  }
  .logo-brand {
    font-size: 1.05rem;
    gap: 6px;
  }
  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }
  .nav-menu {
    display: none;
  }
  .nav-cta {
    padding: 6px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
    gap: 5px;
    box-shadow: none;
  }

  /* BREADCRUMBS & BADGES */
  .breadcrumb-nav {
    padding: 10px 0 8px;
    font-size: 0.76rem;
  }
  .badge-row {
    gap: 6px;
    margin-bottom: 12px;
  }
  .badge-pill {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* TITLES & HEADINGS */
  .hub-intro {
    margin-bottom: 28px;
  }
  .hub-title {
    font-size: 1.6rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }
  .hub-dek {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .review-hero {
    padding: 12px 0 20px;
  }
  .review-title {
    font-size: 1.45rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }
  .review-dek {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  /* AUTHOR META */
  .author-meta {
    padding: 12px 14px;
    gap: 12px;
    font-size: 0.82rem;
    margin-bottom: 24px;
  }
  .author-avatar {
    width: 38px;
    height: 38px;
  }

  /* SCORE CARD MOBILE */
  .score-summary-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
    gap: 18px;
    margin-bottom: 28px;
  }
  .score-badge-main {
    padding: 14px 10px;
  }
  .score-number {
    font-size: 2.75rem;
  }
  .score-metrics-list {
    gap: 12px;
  }
  .metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.82rem;
  }
  .metric-label {
    min-width: 0;
    flex: 1;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .metric-bar-bg {
    width: 75px;
    flex: none;
  }
  .metric-val {
    min-width: 38px;
    font-size: 0.8rem;
    text-align: right;
  }

  /* PROS & CONS */
  .pros-cons-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 22px 0;
  }
  .pro-con-box {
    padding: 16px 14px;
  }
  .pro-con-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  .pro-con-list {
    gap: 8px;
    font-size: 0.88rem;
  }

  /* ARTICLE BODY */
  .article-body {
    padding: 20px 14px;
    border-radius: var(--radius-md);
  }
  .article-body h2 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 26px 0 12px;
    padding-bottom: 8px;
  }
  .article-body h3 {
    font-size: 1.05rem;
    margin: 18px 0 8px;
  }
  .article-body p {
    font-size: 0.94rem;
    line-height: 1.65;
    margin-bottom: 14px;
  }
  .article-body ul, .article-body ol {
    margin: 0 0 16px 18px;
    gap: 6px;
    font-size: 0.92rem;
  }

  /* ALERTS */
  .alert-box {
    padding: 14px 14px;
    margin: 18px 0;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
  }
  .alert-title {
    font-size: 0.92rem;
    margin-bottom: 6px;
  }

  /* COMPARISON TABLE */
  .table-responsive {
    margin: 18px 0;
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
  }
  .comparison-table {
    min-width: 460px;
    font-size: 0.84rem;
  }
  .comparison-table th, .comparison-table td {
    padding: 9px 10px;
  }

  /* CTA BANNER */
  .cta-banner {
    padding: 26px 14px;
    border-radius: var(--radius-md);
    margin-top: 30px;
  }
  .cta-banner h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }
  .cta-banner p {
    font-size: 0.88rem;
    margin-bottom: 18px;
  }
  .btn-cta-white {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.9rem;
    box-sizing: border-box;
  }

  /* HUB COMPETITOR GRID */
  .competitor-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 36px;
  }
  .competitor-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
  .card-name {
    font-size: 1.15rem;
  }
  .card-summary {
    font-size: 0.88rem;
  }

  /* FOOTER */
  .site-footer {
    padding: 32px 0 20px;
    margin-top: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .logo-brand span:not(.logo-icon) {
    font-size: 0.98rem;
  }
  .nav-cta {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
  .nav-cta i {
    font-size: 0.72rem;
  }
  .review-title {
    font-size: 1.3rem;
  }
  .hub-title {
    font-size: 1.38rem;
  }
  .metric-bar-bg {
    width: 50px;
  }
}
