/* Guitar Fretboard Visualizer Styles - Design Moderne Blanc */

.guitar-fretboard-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

/* Titre du manche */
.fretboard-title {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.fretboard-title h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Zone du manche */
.guitar-fretboard {
    position: relative;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px 15px 25px 15px;
    overflow-x: auto;
    overflow-y: visible;
    min-height: 340px;
    width: 100%;
    max-width: 100%;
    border: 2px solid #dee2e6;
}

.fretboard-svg {
    display: block;
    margin: 0 auto;
    height: auto;
}

/* Cordes */
.string {
    stroke: #495057;
    stroke-linecap: round;
}

.string.string-1 { stroke-width: 1.5; stroke: #6c757d; }
.string.string-2 { stroke-width: 2; stroke: #6c757d; }
.string.string-3 { stroke-width: 2.5; stroke: #5a6268; }
.string.string-4 { stroke-width: 3; stroke: #495057; }
.string.string-5 { stroke-width: 3.5; stroke: #495057; }
.string.string-6 { stroke-width: 4; stroke: #343a40; }

/* Frettes */
.fret {
    stroke: #adb5bd;
    stroke-width: 2;
    stroke-linecap: round;
}

.fret.nut {
    stroke: #343a40;
    stroke-width: 6;
}

/* Marqueurs de frettes */
.fret-marker {
    fill: #ced4da;
    opacity: 0.6;
}

/* Notes sur le manche */
.note-circle {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.note-circle.root {
    fill: #ef4444;
    stroke: #dc2626;
    stroke-width: 2.5;
}

.note-circle.scale-note {
    fill: #3b82f6;
    stroke: #2563eb;
    stroke-width: 2.5;
}

.note-circle.triad-note {
    fill: #10b981;
    stroke: #059669;
    stroke-width: 2.5;
}

.note-circle:hover {
    opacity: 0.85;
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.note-text {
    fill: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.interval-text {
    fill: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Indicateur de Box */
.box-indicator {
    fill: #818cf8;
    opacity: 0.12;
    rx: 4;
}

.box-label {
    fill: #4f46e5;
    font-size: 14px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0.7;
}

/* Légende */
.fretboard-legend {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.legend-color {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-color.root {
    background: #ef4444;
    border-color: #dc2626;
}

.legend-color.note {
    background: #3b82f6;
    border-color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .guitar-fretboard-container {
        padding: 15px;
        margin: 15px auto;
    }
    
    .guitar-fretboard {
        padding: 15px 10px 20px 10px;
    }
    
    .fretboard-title h3 {
        font-size: 16px;
    }
    
    .fretboard-legend {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* Scrollbar personnalisée */
.guitar-fretboard::-webkit-scrollbar {
    height: 10px;
}

.guitar-fretboard::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 5px;
}

.guitar-fretboard::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    border: 2px solid #f1f3f5;
}

.guitar-fretboard::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

/* Animation pour l'apparition des notes */
@keyframes noteAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.note-circle {
    animation: noteAppear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Style pour grille de manches */
.fretboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.fretboard-grid .guitar-fretboard-container {
    margin: 0;
}

/* Effet de focus/hover sur le conteneur */
.guitar-fretboard-container:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Mode sombre optionnel (si besoin plus tard) */
@media (prefers-color-scheme: dark) {
    .guitar-fretboard-container.dark-mode {
        background: #1f2937;
        border-color: #374151;
    }
    
    .guitar-fretboard.dark-mode {
        background: linear-gradient(to bottom, #111827 0%, #1f2937 100%);
        border-color: #374151;
    }
}