/**
 * Styles spécifiques à la page métronome
 * Complément au CSS métronome existant
 */

.metronome-page {
    max-width: 900px;
    margin: 0 auto;
}

.metronome-main-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.metronome-main-panel:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.metronome-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    min-height: 200px;
    position: relative;
}

.beat-indicator {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #e9ecef;
    border: 4px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #6c757d;
    transition: all 0.1s ease-out;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.beat-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.1s ease-out;
}

.beat-indicator.active {
    background: #28a745;
    border-color: #1e7e34;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.4);
}

.beat-indicator.active::before {
    opacity: 1;
}

.beat-indicator.accent {
    background: #dc3545;
    border-color: #c82333;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.4);
}

.beat-indicator.accent::before {
    opacity: 1;
}

.tempo-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tempo-value {
    font-size: 3rem;
    font-weight: bold;
    color: #007bff;
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.time-signature-display {
    text-align: center;
    margin-top: 1rem;
}

.time-signature-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    display: block;
}

.tempo-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.tempo-preset {
    padding: 0.75rem 0.5rem;
    border: 2px solid #dee2e6;
    border-radius: 0.75rem;
    background: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.tempo-preset:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.tempo-preset.active {
    background: #007bff;
    border-color: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.time-signature-presets {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.time-signature-preset {
    padding: 0.75rem 1.25rem;
    border: 2px solid #dee2e6;
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.time-signature-preset:hover {
    background: #f8f9fa;
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.time-signature-preset.active {
    background: #28a745;
    border-color: #1e7e34;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.controls-section {
    background: white;
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.controls-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.controls-section h5 {
    color: #495057;
    margin-bottom: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.volume-value {
    min-width: 4rem;
    text-align: center;
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.keyboard-shortcuts {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid #dee2e6;
}

.keyboard-shortcuts h6 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shortcut-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    font-size: 0.9rem;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.shortcut-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.shortcut-key {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    min-width: 2.5rem;
    text-align: center;
}

/* Dark mode support */
[data-bs-theme="dark"] .metronome-main-panel {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    border-color: #495057;
}

[data-bs-theme="dark"] .beat-indicator {
    background: #495057;
    border-color: #6c757d;
    color: #adb5bd;
}

[data-bs-theme="dark"] .tempo-value {
    color: #0dcaf0;
}

[data-bs-theme="dark"] .time-signature-value {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .controls-section {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .controls-section h5 {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .tempo-preset {
    background: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .tempo-preset:hover {
    background: #6c757d;
}

[data-bs-theme="dark"] .time-signature-preset {
    background: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .time-signature-preset:hover {
    background: #6c757d;
}

[data-bs-theme="dark"] .keyboard-shortcuts {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    border-color: #495057;
}

[data-bs-theme="dark"] .keyboard-shortcuts h6 {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .shortcut-item {
    background: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .shortcut-item:hover {
    background: #6c757d;
}

[data-bs-theme="dark"] .shortcut-key {
    background: #6c757d;
    border-color: #adb5bd;
    color: #f8f9fa;
}

/* Responsive design */
@media (max-width: 768px) {
    .metronome-main-panel {
        padding: 1.5rem;
    }
    
    .beat-indicator {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }
    
    .tempo-value {
        font-size: 2.5rem;
    }
    
    .time-signature-value {
        font-size: 1.25rem;
    }
    
    .tempo-presets {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .time-signature-presets {
        gap: 0.5rem;
    }
    
    .time-signature-preset {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: 50px;
    }
    
    .shortcut-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .metronome-main-panel {
        padding: 1rem;
    }
    
    .beat-indicator {
        width: 100px;
        height: 100px;
        font-size: 1.75rem;
    }
    
    .tempo-value {
        font-size: 2rem;
    }
    
    .controls-section {
        padding: 1.25rem;
    }
    
    .volume-control {
        gap: 1rem;
    }
}
