/**
 * MODE GAMMES - Manche simplifié
 * Positionnement absolu : lignes + ronds
 * Affichage en lecture seule (pas de clic)
 */

:root {
    --color-background: #FFF8DC;
    --color-string: black;
    --color-fret: grey;
    --color-nut: black;
    --color-dot: #1F2937;
    --color-dot-text: white;
    
    --string-spacing: 50px;  /* Distance entre les cordes */
    --fret-spacing: 90px;    /* Distance entre les frettes */
}

/* ============================================
   RÉGLAGES PAR INSTRUMENT
   ============================================ */
.fretboard-guitare {
    --string-spacing: 50px;
}

.fretboard-ukulele {
    --string-spacing: 55px;
}

.fretboard-charango {
    --string-spacing: 52px;
}

.fretboard-basse {
    --string-spacing: 60px;
}

.fretboard-mandoline {
    --string-spacing: 52px;
}

.fretboard-banjo {
    --string-spacing: 55px;
}

/* ============================================
   CONTENEUR DU MANCHE
   ============================================ */
.fretboard-interactive {
    background: var(--color-background);
    padding: 20px;
    display: inline-block;
    position: relative;
    margin-left: 70px;
    margin-top: 50px;
    margin-bottom: 50px;
}

/* ============================================
   CORDES (lignes horizontales)
   ============================================ */
.fretboard-string {
    position: absolute;
    left: 0;
    right: 0;
    height: 2.5px;
    background: var(--color-string);
    z-index: 5;
}

/* ============================================
   FRETTES (lignes verticales)
   ============================================ */
.fretboard-fret {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-fret);
}

/* Sillet (frette 0) plus épaisse */
.fretboard-fret.nut {
    width: 10px;
    background: var(--color-nut);
}

/* ============================================
   NOTES (ronds sur les intersections)
   ============================================ */
.fretboard-dot {
    position: absolute;
    width: 35px;
    height: 35px;
    background: var(--color-dot);
    border: 2px solid white;
    border-radius: 50%;
    display: none; /* Masqué par défaut */
    align-items: center;
    justify-content: center;
    color: var(--color-dot-text);
    font-size: 12px;
    font-weight: bold;
    cursor: default;
    transition: all 0.2s;
    z-index: 10;
}

/* Note sélectionnée (note de la gamme) */
.fretboard-dot.selected {
    display: flex; /* Afficher seulement les notes de la gamme */
}

/* ============================================
   COULEURS DES NOTES PAR DEGRÉ
   ============================================ */

/* Couleur par défaut : NOIR (toutes les notes de la gamme) */
.fretboard-dot.selected {
    background-color: black;
    border: 3px solid white;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* Tonique (degré I) : ROUGE */
.fretboard-dot.selected[data-note-index="0"] {
    background-color: #DC2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

/* ============================================
   PERSONNALISATION FACILE
   Pour changer les couleurs, modifie les valeurs ci-dessous
   ============================================ */

/* Exemples de couleurs (décommente pour activer) :

Seconde (II) en orange :
.fretboard-dot.selected[data-note-index="1"] {
    background-color: #EA580C;
    box-shadow: 0 0 8px rgba(234, 88, 12, 0.5);
}

Tierce (III) en jaune :
.fretboard-dot.selected[data-note-index="2"] {
    background-color: #F59E0B;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

Quarte (IV) en vert :
.fretboard-dot.selected[data-note-index="3"] {
    background-color: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

Quinte (V) en bleu :
.fretboard-dot.selected[data-note-index="4"] {
    background-color: #2563EB;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

Sixte (VI) en violet :
.fretboard-dot.selected[data-note-index="5"] {
    background-color: #7C3AED;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

Septième (VII) en rose :
.fretboard-dot.selected[data-note-index="6"] {
    background-color: #DB2777;
    box-shadow: 0 0 8px rgba(219, 39, 119, 0.5);
}

*/

/* ============================================
   REPÈRES DE FRETTES
   ============================================ */
.fretboard-markers {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
}

/* Marqueurs en bas (par défaut) */
.fretboard-markers-bottom {
    /* La position top est définie dynamiquement par le JS */
    margin-top: 10px;
}

/* Marqueurs en haut */
.fretboard-markers-top {
    top: -65px; /* Distance au-dessus du manche - tu peux ajuster */
}

.trouve-accord-instrument-container.zoomed-out .fretboard-markers-top {
    top: -90 px; /* Ajoute cette règle */
}

.fretboard-marker {
    width: var(--fret-spacing);
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    color: black;
}

.fretboard-marker.empty {
    color: transparent;
}

/* ============================================
   PRINT
   ============================================ */

@media print {
    .fretboard-interactive {
        background: white;
    }
    
    .fretboard-dot {
        border: 1px solid #333;
    }
    
    .fretboard-dot.selected {
        background: #999;
        box-shadow: none;
    }
}
