/* =============================================================================
   TEST-PHONE - Styles CSS (Mobile-First)
   Inspiré du Roadbook
   ============================================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-rgb: 37, 99, 235;
    --success: #22c55e;
    --success-dark: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --dark: #1f2937;
    --gray: #6b7280;
    --light: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--light);
    color: var(--dark);
    min-height: 100vh;
    line-height: 1.5;
}

/* =============================================================================
   Container
   ============================================================================= */

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
}

/* =============================================================================
   Page d'accueil (Login-like)
   ============================================================================= */

.welcome-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 1rem;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.welcome-title {
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.welcome-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-box {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.welcome-box h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.25rem;
}

.device-info {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--gray);
}

.device-info p {
    margin-bottom: 0.25rem;
}

.device-info strong {
    color: var(--dark);
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    min-height: 52px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, #15803d 100%);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: auto;
}

/* =============================================================================
   App Header
   ============================================================================= */

.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
}

.app-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-quit {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 15px;
    text-decoration: none;
    cursor: pointer;
}

/* =============================================================================
   Alerts
   ============================================================================= */

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* =============================================================================
   Tests de compatibilité
   ============================================================================= */

.tests-list {
    margin-top: 1rem;
}

.test-item {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.test-item.running {
    border-left: 4px solid var(--primary);
}

.test-item.passed {
    border-left: 4px solid var(--success);
}

.test-item.partial {
    border-left: 4px solid var(--warning);
}

.test-item.failed {
    border-left: 4px solid var(--danger);
}

.test-item.pending {
    border-left: 4px solid #d1d5db;
    opacity: 0.6;
}

.test-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.test-icon.pending { background: #f3f4f6; }
.test-icon.running { background: #dbeafe; animation: pulse 1.5s infinite; }
.test-icon.passed { background: #dcfce7; }
.test-icon.partial { background: #fef3c7; }
.test-icon.failed { background: #fee2e2; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.test-info {
    flex: 1;
}

.test-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.test-detail {
    font-size: 0.8rem;
    color: var(--gray);
}

.test-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
}

.test-badge.critical { background: #fee2e2; color: #991b1b; }
.test-badge.optional { background: #f3f4f6; color: #6b7280; }

/* Score global */
.score-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
}

.score-circle.good { background: linear-gradient(135deg, var(--success), var(--success-dark)); }
.score-circle.medium { background: linear-gradient(135deg, var(--warning), #d97706); }
.score-circle.bad { background: linear-gradient(135deg, var(--danger), #dc2626); }

.score-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.score-message {
    font-size: 0.9rem;
    color: var(--gray);
}

/* =============================================================================
   Demo Parcours
   ============================================================================= */

.step-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.step-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-number {
    background: rgba(255,255,255,0.25);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.step-body {
    padding: 1.25rem;
}

/* Tabs */
.tab-bar {
    display: flex;
    border-bottom: 2px solid var(--light);
    margin-bottom: 1rem;
}

.tab-btn {
    flex: 1;
    padding: 0.875rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Directions */
.directions-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid #bae6fd;
    margin-bottom: 1rem;
}

.directions-box h4 {
    color: #0369a1;
    margin-bottom: 0.75rem;
}

.directions-box p {
    color: #334155;
    line-height: 1.6;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.nav-buttons .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.75rem;
}

/* Camera section */
.camera-section {
    text-align: center;
}

.camera-preview-area {
    background: #1f2937;
    border-radius: var(--radius);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.camera-preview-area video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview-area img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.camera-placeholder {
    color: #9ca3af;
    font-size: 3rem;
}

/* Camera fullscreen overlay */
.camera-fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    flex-direction: column;
}

.camera-fullscreen-overlay.active {
    display: flex;
}

.camera-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    flex-shrink: 0;
}

.camera-fullscreen-header span {
    font-weight: 600;
}

.camera-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-fullscreen-video {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.camera-fullscreen-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-fullscreen-actions {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.camera-capture-btn {
    background: var(--success);
    border: none;
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* Questions */
.question-item {
    background: var(--light);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.question-text {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-btn {
    width: 100%;
    padding: 1rem;
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.option-btn.selected {
    border-color: var(--primary);
    background: #eff6ff;
    font-weight: 600;
}

.option-btn.correct {
    border-color: var(--success);
    background: #dcfce7;
}

.question-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 1rem;
}

.question-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Keep-alive / Stability section */
.stability-tests {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stability-item {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stability-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: var(--white);
}

.stability-info {
    flex: 1;
}

.stability-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.stability-info p {
    font-size: 0.8rem;
    color: var(--gray);
}

.stability-status {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Chronometer */
.chrono-display {
    background: var(--dark);
    color: var(--white);
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    letter-spacing: 2px;
}

.chrono-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* =============================================================================
   Result page
   ============================================================================= */

.result-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.result-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
}

.result-status {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.result-status.ok { background: #dcfce7; color: #166534; }
.result-status.partial { background: #fef3c7; color: #92400e; }
.result-status.ko { background: #fee2e2; color: #991b1b; }
.result-status.na { background: #f3f4f6; color: #6b7280; }

.verdict-box {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    margin: 1.5rem 0;
}

.verdict-box.compatible {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
}

.verdict-box.partial-compatible {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
}

.verdict-box.incompatible {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
}

.verdict-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.verdict-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.verdict-message {
    font-size: 0.95rem;
    color: var(--gray);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.good { background: var(--success); }
.progress-fill.medium { background: var(--warning); }
.progress-fill.bad { background: var(--danger); }

/* =============================================================================
   Step navigation
   ============================================================================= */

.step-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s;
}

.step-dot.active {
    background: var(--primary);
    width: 32px;
    border-radius: 6px;
}

.step-dot.completed {
    background: var(--success);
}

/* =============================================================================
   Spinner / Loading
   ============================================================================= */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.spinner-white {
    border-top-color: var(--white);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================================================
   Photo status
   ============================================================================= */

.photo-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.photo-status.success {
    background: #dcfce7;
    color: #166534;
}

.photo-status.error {
    background: #fee2e2;
    color: #991b1b;
}

/* =============================================================================
   GPS coords display
   ============================================================================= */

.gps-coords {
    background: var(--dark);
    color: #10b981;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-top: 0.5rem;
}

/* =============================================================================
   Version
   ============================================================================= */

.version-tag {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-box {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .test-item {
        padding: 1rem;
    }

    .chrono-display {
        font-size: 2rem;
    }
}

@media (max-width: 360px) {
    .welcome-title {
        font-size: 1.25rem;
    }

    .app-logo {
        font-size: 0.95rem;
    }

    .test-name {
        font-size: 0.9rem;
    }
}

/* =============================================================================
   Benchmark Dashboard
   ============================================================================= */

.benchmark-section {
    background: var(--light);
    padding: 2rem 1rem 3rem;
    width: 100%;
}

.benchmark-container {
    max-width: 520px;
    margin: 0 auto;
}

.benchmark-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.benchmark-header h2 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.benchmark-header p {
    font-size: 0.8rem;
    color: var(--gray);
}

.benchmark-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.benchmark-refresh .spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

/* Stats grid - 4 colonnes */
.bench-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.bench-stat {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    text-align: center;
}

.bench-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.bench-stat-value.blue { color: var(--primary); }
.bench-stat-value.green { color: var(--success); }
.bench-stat-value.orange { color: var(--warning); }
.bench-stat-value.red { color: var(--danger); }

.bench-stat-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Card benchmark */
.bench-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.bench-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Barres horizontales pour taux de réussite */
.bench-bar-item {
    margin-bottom: 0.75rem;
}

.bench-bar-item:last-child {
    margin-bottom: 0;
}

.bench-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.bench-bar-name {
    font-weight: 600;
    color: var(--dark);
}

.bench-bar-pct {
    font-weight: 700;
    font-size: 0.8rem;
}

.bench-bar-track {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}

.bench-bar-fill-ok {
    height: 100%;
    background: var(--success);
    transition: width 0.6s ease;
}

.bench-bar-fill-partial {
    height: 100%;
    background: var(--warning);
    transition: width 0.6s ease;
}

/* Répartition plateformes */
.bench-platforms {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bench-platform-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light);
}

.bench-platform-row:last-child {
    border-bottom: none;
}

.bench-platform-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.bench-platform-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.bench-platform-count {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    min-width: 30px;
    text-align: right;
}

.bench-platform-score {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 42px;
    text-align: center;
}

/* Tableau des derniers tests */
.bench-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.bench-table th {
    background: var(--light);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    padding: 0.5rem 0.4rem;
    text-align: center;
}

.bench-table th:first-child {
    text-align: left;
}

.bench-table td {
    padding: 0.5rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid var(--light);
    vertical-align: middle;
}

.bench-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.bench-table .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.bench-table .dot.ok { background: var(--success); }
.bench-table .dot.partial { background: var(--warning); }
.bench-table .dot.ko { background: var(--danger); }
.bench-table .dot.na { background: #d1d5db; }

.bench-table .score-cell {
    font-weight: 700;
    font-size: 0.8rem;
}

/* Graphique quotidien simplifié (barres CSS) */
.bench-daily {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
    padding-top: 0.5rem;
}

.bench-daily-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.bench-daily-fill {
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    transition: height 0.6s ease;
    min-height: 2px;
}

.bench-daily-label {
    font-size: 0.6rem;
    color: var(--gray);
    white-space: nowrap;
}

.bench-daily-count {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--dark);
}

/* Message "aucune donnée" */
.bench-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.bench-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Lien "scroller vers le benchmark" */
.scroll-hint {
    margin-top: 1.5rem;
    text-align: center;
}

.scroll-hint a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.scroll-hint a:hover {
    color: rgba(255,255,255,1);
}

.scroll-arrow {
    font-size: 1.25rem;
    animation: bounce-arrow 1.5s ease infinite;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* =============================================================================
   Responsive benchmark
   ============================================================================= */

@media (min-width: 400px) {
    .bench-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .bench-stat-value {
        font-size: 1.5rem;
    }

    .bench-stat-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 399px) {
    .bench-table {
        font-size: 0.7rem;
    }

    .bench-table th,
    .bench-table td {
        padding: 0.4rem 0.25rem;
    }
}

/* PWA styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}
