/* ── Live Benchmark Styles ───────────────────────────────────── */

/* Hero section */
.bench-hero {
    padding: 3rem 0 2rem;
    text-align: left;
}
.bench-hero h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Benchmark page uses full available width */
.container-bench {
    max-width: 100%;
    padding: 0 3rem;
}
.bench-hero p {
    color: var(--muted-foreground);
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}
.bench-hero .eyebrow {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    background: oklch(0.62 0.13 162 / 0.1);
    color: var(--emerald);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-elegant);
    margin: 2rem 0;
}
.stat-item {
    flex: 1;
    text-align: center;
}
.stat-item .stat-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
}
.stat-item .stat-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-top: 0.35rem;
}
.stat-item .stat-sub {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    opacity: 0.7;
    margin-top: 0.15rem;
}
.stat-value.score-standard { color: var(--emerald); }
.stat-value.score-real { color: oklch(0.85 0.13 88); }
.stat-value.score-total { color: var(--foreground); }

/* Comparison section */
.comparison-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-elegant);
}
.comparison-section h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.comparison-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.comparison-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.comparison-card h3 .kodus-label,
.comparison-card h3 .martian-label {
    color: var(--muted-foreground);
}
.comparison-card h3 .fr-label {
    color: var(--emerald);
}
.comparison-card .stat-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.comparison-card .stat-line:last-child { border-bottom: none; }
.comparison-card .stat-line .label { color: var(--muted-foreground); }
.comparison-card .stat-line .value { font-weight: 600; }

/* Bar chart */
.bar-chart { margin-top: 1rem; }
.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.bar-row .bar-label {
    width: 60px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}
.bar-row .bar-track {
    flex: 1;
    height: 1.5rem;
    background: var(--secondary);
    border-radius: 99px;
    overflow: hidden;
}
.bar-row .bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease;
}
.bar-fill.kodus,
.bar-fill.martian { background: var(--muted-foreground); opacity: 0.5; }
.bar-fill.fr { background: var(--emerald); }
.bar-fill.supp { background: oklch(0.85 0.13 88); }
.bar-row .bar-count {
    width: 60px;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Project grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}
.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-elegant);
    transition: border-color 0.2s;
    cursor: pointer;
}
.project-card:hover { border-color: var(--emerald); }
.project-card .project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.project-card .project-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}
.project-card .project-lang {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    background: var(--secondary);
    font-size: 0.75rem;
    color: var(--muted-foreground);
}
/* Standalone project-lang badge (outside .project-card) */
.project-lang {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    background: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--foreground);
}
.project-card .project-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.project-card .project-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--secondary);
    border-radius: var(--radius);
}
.project-card .project-stat .ps-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
}
.project-card .project-stat .ps-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Page header (project/pr detail) */
.page-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 0;
}
.page-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}
.page-header .back-link:hover { color: var(--foreground); }
.page-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.9rem;
}
.page-header .breadcrumb a {
    color: var(--muted-foreground);
    text-decoration: none;
}
.page-header .breadcrumb a:hover { color: var(--foreground); }
.page-header .breadcrumb .sep { opacity: 0.4; }
.page-header .breadcrumb .current { color: var(--foreground); font-weight: 600; }

/* Tables */
.bench-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.bench-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-foreground);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.bench-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.bench-table tr:hover td { background: transparent; }
.bench-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85rem; }

/* Status indicators */
.status-found { color: var(--emerald); font-weight: 600 }
.status-partial { color: oklch(0.78 0.12 85); font-weight: 600; }
.status-missed { color: var(--danger); font-weight: 600; }
.status-na { color: var(--muted-foreground); font-style: italic; }
span.status-found {
  display: inline-block; /* Vous pouvez le garder ou l'enlever */
  white-space: nowrap;  /* <--- C'est cette ligne qui corrige tout */
}
span.status-missed {
  display: inline-block; /* Vous pouvez le garder ou l'enlever */
  white-space: nowrap;  /* <--- C'est cette ligne qui corrige tout */
}
span.status-partial {
  display: inline-block; /* Vous pouvez le garder ou l'enlever */
  white-space: nowrap;  /* <--- C'est cette ligne qui corrige tout */
}


/* Severity badges */
.sev-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
.sev-critical { background: oklch(0.55 0.21 27 / 0.15); color: oklch(0.72 0.19 27); }
.sev-medium { background: oklch(0.78 0.12 85 / 0.15); color: oklch(0.72 0.14 80); }
.sev-low { background: oklch(0.48 0.02 155 / 0.12); color: var(--muted-foreground); }

/* Score badges */
.score-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
}
.score-badge.good { background: oklch(0.62 0.13 162 / 0.15); color: var(--emerald); }
.score-badge.ok { background: oklch(0.78 0.12 85 / 0.15); color: oklch(0.72 0.14 80); }
.score-badge.bad { background: oklch(0.55 0.21 27 / 0.15); color: oklch(0.72 0.19 27); }

/* Sections */
.section-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-elegant);
}
.section-card h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.section-card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Commentary / Analysis block */
.commentary {
    border-left: 3px solid var(--emerald);
    background: oklch(0.62 0.13 162 / 0.06);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    line-height: 1.65;
}
.commentary p { margin-bottom: 0.75rem; }
.commentary p:last-child { margin-bottom: 0; }

/* Callout blocks */
.callout {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.callout.info {
    border: 1px solid oklch(0.62 0.13 162 / 0.25);
    background: oklch(0.62 0.13 162 / 0.08);
}
.callout.warning {
    border: 1px solid oklch(0.78 0.12 85 / 0.3);
    background: oklch(0.78 0.12 85 / 0.1);
}
.callout p { margin: 0; }

/* Metadata list */
.meta-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1rem;
    font-size: 0.9rem;
}
.meta-list .meta-key { color: var(--muted-foreground); }
.meta-list .meta-value { font-weight: 500; }
.meta-list .meta-value a { color: var(--emerald); text-decoration: none; }
.meta-list .meta-value a:hover { text-decoration: underline; }

/* PR table row link */
.pr-row { cursor: pointer; }
.pr-row:hover td { background: oklch(0.62 0.13 162 / 0.06) !important; }

/* How-to page */
.howto-section {
    margin: 2rem 0;
}
.howto-section h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.howto-section h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}
.howto-section p {
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.howto-section ul, .howto-section ol {
    color: var(--muted-foreground);
    line-height: 1.6;
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}
.howto-section li { margin-bottom: 0.5rem; }

/* Score explanation cards */
.score-explanation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
.score-explanation .score-card {
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.score-explanation .score-card.formula {
    background: oklch(0.62 0.13 162 / 0.06);
    border-color: oklch(0.62 0.13 162 / 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .bench-hero h1 { font-size: 1.75rem; }
    .stats-bar { flex-direction: column; gap: 1rem; }
    .project-grid { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: 1fr; }
    .score-explanation { grid-template-columns: 1fr; }
    .bench-table { font-size: 0.8rem; }
    .bench-table th, .bench-table td { padding: 0.5rem; }
}
@media (max-width: 480px) {
    .bench-hero h1 { font-size: 1.35rem; }
    .bar-row .bar-label, .bar-row .bar-count { width: 40px; font-size: 0.75rem; }
}
