/**
 * BENCHMARKS ET COMPARAISONS - Vraivex Audit
 * Styles pour les benchmarks et indicateurs de performance
 */

.benchmark-section {
    margin: 2rem 0;
}

.benchmark-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
    transition: var(--transition-ease);
}

.benchmark-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.benchmark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.benchmark-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.benchmark-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.benchmark-status.excellent {
    background: var(--green-light);
    color: var(--green-dark);
}

.benchmark-status.good {
    background: var(--blue-light);
    color: var(--blue-dark);
}

.benchmark-status.warning {
    background: var(--orange-light);
    color: var(--orange-dark);
}

.benchmark-status.critical {
    background: var(--red-light);
    color: var(--red-dark);
}

.benchmark-body {
    margin-bottom: 1rem;
}

.benchmark-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.benchmark-label {
    font-size: 0.9rem;
    color: var(--text-color-medium);
}

.benchmark-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color-dark);
}

.benchmark-bar-container {
    position: relative;
    width: 100%;
    height: 40px;
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.benchmark-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
}

.benchmark-bar-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}

.benchmark-bar-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.benchmark-bar-marker::after {
    content: attr(data-label);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-color-medium);
    white-space: nowrap;
}

.benchmark-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-color-medium);
    margin-top: 0.5rem;
}

.benchmark-comparison {
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.benchmark-stat {
    text-align: center;
}

.benchmark-stat-label {
    font-size: 0.85rem;
    color: var(--text-color-medium);
    margin-bottom: 0.3rem;
}

.benchmark-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
}

.benchmark-stat-value.current {
    color: var(--primary-color);
}

.benchmark-stat-value.target {
    color: var(--green-dark);
}

.benchmark-stat-value.average {
    color: var(--text-color-medium);
}

.benchmark-improvement {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--primary-color);
}

.benchmark-improvement-title {
    font-weight: 700;
    color: var(--text-color-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.benchmark-improvement-text {
    font-size: 0.9rem;
    color: var(--text-color-medium);
    line-height: 1.5;
}

/* Indicator de progression circulaire */
.benchmark-circular-progress {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.benchmark-circular-progress svg {
    transform: rotate(-90deg);
}

.benchmark-circular-progress-bg {
    fill: none;
    stroke: var(--background-medium);
    stroke-width: 10;
}

.benchmark-circular-progress-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.benchmark-circular-progress-fill.excellent {
    stroke: var(--green-dark);
}

.benchmark-circular-progress-fill.good {
    stroke: var(--blue-dark);
}

.benchmark-circular-progress-fill.warning {
    stroke: var(--orange-dark);
}

.benchmark-circular-progress-fill.critical {
    stroke: var(--red-dark);
}

.benchmark-circular-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.benchmark-circular-progress-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color-dark);
}

.benchmark-circular-progress-label {
    font-size: 0.75rem;
    color: var(--text-color-medium);
}

/* Tableau de comparaison */
.benchmark-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.benchmark-comparison-table th,
.benchmark-comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.benchmark-comparison-table th {
    background: var(--background-light);
    font-weight: 700;
    color: var(--text-color-dark);
    font-size: 0.9rem;
}

.benchmark-comparison-table td {
    font-size: 0.95rem;
    color: var(--text-color-dark);
}

.benchmark-comparison-table tr:hover {
    background: var(--background-light);
}

.benchmark-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.benchmark-indicator.up {
    color: var(--green-dark);
}

.benchmark-indicator.down {
    color: var(--red-dark);
}

.benchmark-indicator.neutral {
    color: var(--text-color-medium);
}

/* Responsive */
@media (max-width: 768px) {
    .benchmark-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .benchmark-comparison {
        grid-template-columns: 1fr;
    }
    
    .benchmark-comparison-table {
        font-size: 0.85rem;
    }
    
    .benchmark-comparison-table th,
    .benchmark-comparison-table td {
        padding: 8px;
    }
}


