/* ========================================
   CHRONOMÈTRE PROFESSIONNEL - STYLES
   ======================================== */

/* Container principal style équipement professionnel */
.chrono-container {
    background: #f8f9fa;
    background-image: 
        linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0,0,0,0.01) 10px,
            rgba(0,0,0,0.01) 20px
        );
    border: 1px solid #dee2e6;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.08),
        0 4px 8px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.9);
    text-align: center;
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
}

/* Bord métallique subtil */
.chrono-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, #e9ecef 0%, #ffffff 50%, #e9ecef 100%);
    border-radius: 16px;
    z-index: -1;
}

/* Affichage principal style LCD professionnel */
.chrono-display {
    font-size: 5rem;
    font-weight: 300;
    color: #212529;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.05em;
    line-height: 1;
    margin: 2rem 0;
    padding: 2rem 3rem;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

/* Reflet subtil sur l'écran */
.chrono-display::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Centièmes en plus petit */
.chrono-millis {
    font-size: 0.7em;
    color: #6c757d;
    font-weight: 400;
}

/* État actif */
.chrono-display.running {
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.04),
        0 0 0 2px rgba(0,123,255,0.1);
}

/* Contrôles style équipement professionnel */
.chrono-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* Boutons style matériel réel */
.btn-chrono {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 120px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #6c757d;
    color: white;
    border-color: #545b62;
}

/* Ombre réaliste des boutons */
.btn-chrono::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
    z-index: -1;
}

/* Bouton Start - Vert professionnel */
.btn-start {
    background: #28a745;
    color: white;
    border-color: #208637;
}

.btn-start:hover:not(:disabled) {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.btn-start:hover:not(:disabled)::before {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-start:active:not(:disabled) {
    transform: translateY(0);
}

/* Bouton Lap - Bleu professionnel */
.btn-lap {
    background: #007bff;
    color: white;
    border-color: #0062cc;
}

.btn-lap:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #0062cc;
}

.btn-lap:hover:not(:disabled) {
    background: #0069d9;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.btn-lap:hover:not(:disabled)::before {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-lap:active:not(:disabled) {
    transform: translateY(0);
}

/* Bouton Stop - Rouge professionnel */
.btn-stop {
    background: #dc3545;
    color: white;
    border-color: #bd2130;
}

.btn-stop:hover:not(:disabled) {
    background: #c82333;
    border-color: #b21f2d;
    transform: translateY(-1px);
}

/* Bouton Reset - Gris neutre */
.btn-reset {
    background: #6c757d;
    color: white;
    border-color: #545b62;
}

.btn-reset:hover {
    background: #5a6268;
    border-color: #4e555b;
    transform: translateY(-1px);
}

/* État désactivé - Style général */
.btn-chrono:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* État désactivé - Boutons spécifiques */
.btn-start:disabled,
.btn-stop:disabled,
.btn-reset:disabled {
    background: #e9ecef !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
}

/* Bouton Tour désactivé - garde son style bleu mais plus pâle */
.btn-lap:disabled {
    background: #b8d4f1 !important;
    color: #004085 !important;
    border-color: #9ec5e5 !important;
}

/* Container des temps style tableau professionnel */
.laps-container {
    max-width: 700px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.laps-container h3 {
    color: #212529;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.laps-container p {
    color: #6c757d !important;
}

/* Liste des tours style tableau */
.laps-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fafbfc;
}

/* Scrollbar discrète */
.laps-list::-webkit-scrollbar {
    width: 6px;
}

.laps-list::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.laps-list::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}

.laps-list::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

/* Items de tour style ligne de tableau */
.lap-item {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    font-family: 'SF Mono', monospace;
    font-size: 0.95rem;
    transition: background-color 0.15s ease;
}

.lap-item:last-child {
    border-bottom: none;
}

.lap-item:hover {
    background: #f8f9fa;
}

/* Animation d'entrée subtile */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lap-item.new {
    animation: fadeIn 0.3s ease-out;
}

/* Styles des colonnes */
.lap-number {
    color: #495057;
    font-weight: 600;
}

.lap-time {
    color: #212529;
    text-align: center;
    font-weight: 500;
}

.lap-total {
    color: #495057;
    text-align: center;
}

.lap-diff {
    text-align: right;
    font-size: 0.875rem;
    font-weight: 500;
}

.lap-diff.positive {
    color: #dc3545;
}

.lap-diff.negative {
    color: #28a745;
}

/* Meilleur tour */
.lap-item.best {
    background: #d1ecf1;
    border-left: 3px solid #0c5460;
}

/* Indicateurs d'état minimalistes */
.chrono-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dee2e6;
    transition: all 0.2s ease;
}

.indicator-dot.active {
    background: #28a745;
    box-shadow: 0 0 0 2px rgba(40,167,69,0.2);
}

/* Aide discrète */
.chrono-help {
    text-align: center;
    margin-top: 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.chrono-help kbd {
    background: #f8f9fa;
    padding: 0.125rem 0.375rem;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-family: 'SF Mono', monospace;
    font-size: 0.8125rem;
    margin: 0 0.125rem;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .chrono-display {
        font-size: 3.5rem;
        padding: 1.5rem 2rem;
    }
    
    .chrono-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn-chrono {
        width: 200px;
    }
    
    .lap-item {
        grid-template-columns: 60px 1fr 1fr;
        font-size: 0.875rem;
    }
    
    .lap-diff {
        display: none;
    }
}

@media (max-width: 480px) {
    .chrono-display {
        font-size: 2.5rem;
        padding: 1rem 1.5rem;
    }
    
    .chrono-container {
        padding: 1.5rem;
    }
}

/* Mode sombre (si le site a un mode sombre) */
@media (prefers-color-scheme: dark) {
    .chrono-container {
        background: #1a1d21;
        background-image: none;
        border-color: #2d3238;
    }
    
    .chrono-container::before {
        background: linear-gradient(135deg, #2d3238 0%, #1a1d21 50%, #2d3238 100%);
    }
    
    .chrono-display {
        background: #0d0f12;
        border-color: #2d3238;
        color: #e9ecef;
    }
    
    .chrono-display.running {
        box-shadow: 
            inset 0 2px 4px rgba(0,0,0,0.3),
            0 0 0 2px rgba(0,123,255,0.2);
    }
    
    .laps-container {
        background: #1a1d21;
        border-color: #2d3238;
    }
    
    .laps-list {
        background: #0d0f12;
        border-color: #2d3238;
    }
    
    .lap-item {
        background: #1a1d21;
        border-color: #2d3238;
        color: #e9ecef;
    }
    
    .lap-item:hover {
        background: #212529;
    }
    
    .lap-item.best {
        background: #163240;
        border-left-color: #0c5460;
    }
    
    .lap-number, .lap-total {
        color: #adb5bd;
    }
    
    .lap-time {
        color: #e9ecef;
    }
    
    .chrono-help kbd {
        background: #212529;
        border-color: #2d3238;
        color: #e9ecef;
    }
}