/**
 * CSS Global
 * Styles communs à toutes les pages avec sections modulaires
 * Fusion de global.css et default.css
 */

/* ========================================
   SECTION: INSTRUMENT SELECTOR
   ======================================== */

/* Sélecteur d'instrument dans la navbar */
.instrument-selector select {
    min-width: 130px;
    border-color: var(--bs-border-color);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.instrument-selector select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* ========================================
   SECTION: BACK TO TOP BAND
   ======================================== */

/* Back to Top Band */
.back-to-top-band {
    background-color: #212529; /* Dark band for light theme */
    border-top: 1px solid #dee2e6;
    /* Removed sticky positioning - now static after footer */
    margin-bottom: 0; /* Remove any margin */
    position: relative;
}
.back-to-top-fulllink {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}


/* Remove margin from footer when preceded by back-to-top-band */
.back-to-top-band + .footer {
    margin-top: 0 !important;
}

.back-to-top-text {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.back-to-top-band {
    cursor: pointer;
}

.back-to-top-band:hover .back-to-top-text { text-decoration: none; }

/* Dark theme overrides for back to top band */
[data-bs-theme="dark"] .back-to-top-band {
    background-color: #f8f9fa; /* Light band for dark theme */
    border-top: 1px solid #495057;
}

[data-bs-theme="dark"] .back-to-top-text { color: #212529; }

/* ========================================
   SECTION: LAYOUT & STRUCTURE
   ======================================== */

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

/* Override Bootstrap container for full width */
.container-lg {
    max-width: none !important;
    width: 100% !important;
}

/* ========================================
   SECTION: HEADER & NAVIGATION
   ======================================== */

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
}

.navbar-brand {
    font-weight: 600;
    color: #007bff !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: #0056b3 !important;
    text-decoration: none;
}

.navbar-brand i {
    color: #007bff;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #007bff !important;
}

.nav-link.active {
    color: #007bff !important;
    font-weight: 600;
}

/* Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    transform: translateX(2px);
}

.dropdown-item i {
    width: 1.25rem;
    text-align: center;
    color: #6c757d;
}

.dropdown-item:hover i {
    color: #007bff;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

/* Responsive navbar */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: #f8f9fa;
        margin-top: 0;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
}

.page-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #212529;
}

.page-header h1 .icon {
    color: #007bff;
    margin-right: 1rem;
}

.page-header .subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: #6c757d;
    margin-bottom: 0;
}

/* Legacy header styles (for backward compatibility) */
.card.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
    border: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.card.bg-primary .card-title {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card.bg-primary .card-text {
    opacity: 0.9;
    font-weight: 500;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header .subtitle {
        font-size: 1.1rem;
    }
    
    /* Navbar search responsive */
    .navbar-search-form {
        min-width: 200px;
        max-width: 100%;
        margin-top: 0.5rem;
    }
    
    .navbar-search-input {
        font-size: 0.85rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-header .subtitle {
        font-size: 1rem;
    }
}

/* ========================================
   SECTION: FORM ELEMENTS
   ======================================== */

/* Song Select with ellipsis */
#songSelect {
    /* max-width: 300px; */
    min-width: 200px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
}

#songSelect option {
    /* max-width: 300px; */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* ========================================
   SECTION: SONG LIST PAGE
   ======================================== */

/* Song Cards */
.song-item {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    cursor: pointer;
    position: relative; /* containing block for .stretched-link */
}

.song-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.song-hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.song-link {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.song-link:hover {
    color: #007bff;
    text-decoration: none;
}

.song-meta {
    margin-top: 0.5rem;
}

.song-actions {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.song-item:hover .song-actions {
    opacity: 1;
}

/* Retiré: bouton play supprimé des cards */

/* View Toggle Buttons */
#viewGrid, #viewList {
    transition: all 0.2s ease;
}

#viewGrid.active, #viewList.active {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Songs Container */
.songs-container {
    min-height: 400px;
}

.songs-list-view .song-card {
    margin-bottom: 1rem;
}

.songs-list-view .song-item {
    display: flex;
    align-items: center;
    padding: 1rem;
}

.songs-list-view .card-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.songs-list-view .song-meta {
    margin-top: 0;
    margin-left: 1rem;
}

/* Filter and Search */
#songFilter:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* No Results */
#noResults {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ========================================
   SECTION: SEARCH FUNCTIONALITY
   ======================================== */

/* Navbar Search */
.navbar-search-form {
    min-width: 250px;
    max-width: 400px;
}

.navbar-search-input {
    border-radius: 20px;
    border: 1px solid #dee2e6;
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.navbar-search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.navbar-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
}

.navbar-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.navbar-search-count {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 500;
}

.navbar-search-list {
    max-height: 350px;
    overflow-y: auto;
}

.navbar-search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.navbar-search-result-item:hover {
    background-color: #f8f9fa;
}

.navbar-search-result-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #007bff;
}

.navbar-search-result-item:last-child {
    border-bottom: none;
}

.navbar-search-result-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.navbar-search-result-artist {
    font-size: 0.875rem;
    color: #6c757d;
}

.navbar-search-result-context {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.search-results-count {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 500;
}

.search-results-list {
    max-height: 350px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #007bff;
}

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

.search-result-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.search-result-artist {
    font-size: 0.875rem;
    color: #6c757d;
}

.search-result-context {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-style: italic;
}

.search-highlight {
    background-color: #fff3cd;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

#searchInput:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Uniformisation des hauteurs pour la card de recherche */
#searchInput,
#songSelect,
#prevSong,
#nextSong,
#shareButton {
    height: 38px;
    line-height: 1.5;
}

/* Uniformisation des hauteurs pour la card des paramètres */
#layoutMode {
    height: 38px;
    line-height: 1.5;
}

/* Uniformisation des labels dans la card des paramètres */
.card .form-label {
    text-align: left;
    margin-bottom: 0.5rem;
    display: block;
}

/* ========================================
   SECTION: TRANSPOSITION CONTROLS
   ======================================== */



.transpose-buttons-floating {
    display: flex;
    flex-wrap: wrap;
    gap: 0.125rem;
    justify-content: center;
}

.btn-transpose {
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    min-width: 2rem;
    text-align: center;
}

.btn-transpose i {
    font-size: 0.75rem;
}

.btn-chord-control {
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    min-width: 2.5rem;
    text-align: center;
    margin: 0 0.125rem;
}

.btn-chord-control:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.btn-chord-control.active {
    background: #28a745;
    border-color: #28a745;
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-chord-control.active:hover {
    background: #1e7e34;
    border-color: #1e7e34;
}

.btn-chord-control i {
    font-size: 0.75rem;
}

.btn-transpose:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.btn-transpose.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-transpose.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* ========================================
   SECTION: CHORD CONTROL BUTTONS
   ======================================== */

/* Styles spécifiques pour les boutons de contrôle des accords */
.chord-controls .btn-chord-control {
    padding: 0.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border: 1px solid #1e7e34;
    background: white;
    color: #1e7e34;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chord-controls .btn-chord-control:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Exception pour le bouton sticky pour éviter les problèmes de clic */
.chord-controls .btn-chord-control#stickyChordsHorizontal:hover {
    transform: none;
}

.chord-controls .btn-chord-control.active {
    background: #28a745;
    border-color: #28a745;
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.chord-controls .btn-chord-control.active:hover {
    background: #1e7e34;
    border-color: #1e7e34;
}



.chord-controls .btn-chord-control i {
    font-size: 0.875rem;
}

/* ========================================
   SECTION: SLIDERS & CONTROLS
   ======================================== */

.slider-container {
    position: relative;
    padding: 0.25rem 0;
}

.form-range {
    width: 100%;
    height: 1.5rem;
    padding: 0;
    background-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.slider-value {
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    min-width: 3rem;
    text-align: center;
    font-size: 0.8rem;
}

.slider-value.extreme-value {
    background: #fff3cd;
    color: #856404;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.slider-label-start {
    font-size: 0.5rem;
    color: #6c757d;
}

.slider-label-end {
    font-size: 1.0rem;
    color: #6c757d;
}

/* Custom slider styling */
.form-range::-webkit-slider-track {
    width: 100%;
    height: 0.5rem;
    cursor: pointer;
    background: #e9ecef;
    border-radius: 0.25rem;
    border: 0;
}

.form-range::-webkit-slider-thumb {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-range::-webkit-slider-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.form-range::-moz-range-track {
    width: 100%;
    height: 0.5rem;
    cursor: pointer;
    background: #e9ecef;
    border-radius: 0.25rem;
    border: 0;
}

.form-range::-moz-range-thumb {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.form-range {
    outline: none;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 0.5rem;
    cursor: pointer;
    background: #e9ecef;
    border-radius: 0.25rem;
    border: 0;
}

.form-range::-webkit-slider-runnable-track:hover {
    background: #dee2e6;
}

.form-range {
    outline: none;
}

.form-range::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: #e9ecef;
    border-radius: 0.25rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.form-range::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: #007bff;
    border-radius: 0.25rem;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.3;
}

#textSize::before {
    background: linear-gradient(to right, #e9ecef 0%, #007bff 100%);
}

#textSize::after {
    background: linear-gradient(to right, #007bff 0%, #e9ecef 100%);
}

#lineHeight::before {
    background: linear-gradient(to right, #e9ecef 0%, #28a745 100%);
}

#lineHeight::after {
    background: linear-gradient(to right, #28a745 0%, #e9ecef 100%);
}

/* ========================================
   SECTION: LAYOUT MODES
   ======================================== */



/* ========================================
   SECTION: CHORD DIAGRAMS
   ======================================== */

.chord-bar-horizontal-container {
    position: relative;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}



.chord-bar-horizontal {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.chord-bar-horizontal-container.sticky-enabled .chord-bar-horizontal {
    border-radius: 0 0 0.5rem 0.5rem;
    border-top: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chord-bar-horizontal-container.sticky-active .chord-bar-horizontal {
    transform: translateY(0);
    opacity: 1;
}

.chord-bar-horizontal .card-body {
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}



.chord-diagrams-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    padding-right: 6rem;
    justify-content: flex-start;
    align-items: flex-start;
}



.chord-diagram-horizontal {
    flex: 0 0 auto;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    /* background: #f5f5f5; */
    text-align: center;
    padding: 0.1rem 0.1rem 0.2rem 0.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chord-diagram-horizontal:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    border-color: #007bff;
}

.chord-diagram-horizontal img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0.125rem;
    transition: all 0.2s ease;
}

.chord-diagram-horizontal .chord-title {
    font-size: 0.75rem;
    font-weight: bold;
    color: #495057;
    text-align: center;
    padding: 0.15rem 0 0.10rem 0;
    /* background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0.25rem 0.25rem 0 0; */
    line-height: 1;
    /* min-height: 1.5rem; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.chord-diagram-horizontal .chord-error {
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem;
    background: #f8d7da;
    border-radius: 0.25rem;
    border: 1px solid #f5c6cb;
}

.chord-controls {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

/* Global Compact Chord Bar */
.chord-bar-horizontal-container {
    margin-bottom: 0.25rem !important;
}

.chord-bar-horizontal .card-body {
    padding: 0.25rem !important;
}



.chord-diagrams-horizontal {
    gap: 0.25rem !important;
}

.chord-controls {
    padding: 0.25rem !important;
    gap: 0.25rem !important;
    right: 0.5rem !important;
}

/* ========================================
   SECTION: AUTO-SCROLL CONTROLS
   ======================================== */

.auto-scroll-floating-panel {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: rgba(240, 210, 100, 0.3);
    border: 1px solid rgba(222, 226, 230, 0.8);
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    min-width: 180px;
    max-width: 220px;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.auto-scroll-floating-panel.auto-scroll-ready {
    transform: translateY(0);
    opacity: 1;
}

.auto-scroll-floating-panel.show {
    transform: translateY(0);
    opacity: 1;
}

.floating-panel-content {
    padding: 0.5rem;
}

.floating-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e9ecef;
}

.panel-title {
    font-weight: 500;
    color: #495057;
    margin: 0;
    font-size: 0.7rem;
}

.panel-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

.floating-panel-controls {
    display: flex;
    flex-direction: row;
    gap: 0.375rem;
    align-items: center;
    justify-content: space-between;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: center;
}

/* ========================================
   SECTION: FLOATING BUTTON STYLES
   ======================================== */

/* Classe de base commune pour tous les boutons flottants
   Utilisée par : métronome, auto-scroll, contrôles d'accords
   Les actions spécifiques sont gérées par les IDs dans le JavaScript */
.btn-floating {
    padding: 0.25rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 0.2rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 0.8rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-floating:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* Variantes de boutons flottants - utilisées pour l'apparence uniquement
   Les actions sont gérées par les IDs spécifiques dans le JavaScript */

/* Bouton Play - vert */
.btn-play {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-play:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* Bouton Pause - jaune */
.btn-pause {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-pause:hover {
    background: #e0a800;
    border-color: #d39e00;
}

/* Bouton utilitaire - gris */
.btn-utility {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-utility:hover {
    background: #5a6268;
    border-color: #545b62;
}

/* ========================================
   SECTION: COMMON CONTROL STYLES
   ======================================== */

.control-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.75rem;
}

.speed-select {
    padding: 0.2rem 0.4rem;
    border: 1px solid #dee2e6;
    border-radius: 0.2rem;
    background: white;
    color: #495057;
    font-size: 0.75rem;
    cursor: pointer;
    min-width: 50px;
    height: 1.75rem;
}

.speed-select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.floating-panel-shortcuts {
    margin-top: 0.5rem;
}

.shortcuts-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: #6c757d;
    align-items: center;
    justify-content: center;
}

.shortcuts-content kbd {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.2rem;
    padding: 0.1rem 0.2rem;
    font-size: 0.65rem;
    font-family: monospace;
    color: #495057;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.shortcuts-content span {
    margin-left: 0.25rem;
    color: #6c757d;
}

.auto-scroll-floating-panel.disabled-mode {
    background: rgba(248, 249, 250, 0.6);
    pointer-events: none;
    padding-bottom: 0.25rem;
}

.auto-scroll-floating-panel.disabled-mode .btn-floating {
    pointer-events: auto;
}

.auto-scroll-floating-panel.disabled-mode .panel-title {
    color: #495057;
}

.auto-scroll-floating-panel.disabled-mode .panel-meta {
    color: #6c757d;
}

.panel-instruction {
    font-size: 0.65rem;
    color: #6c757d;
    text-align: center;
    padding: 0rem;
    line-height: 1.3;
    margin: 0;
}

.panel-message {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    padding: 0.5rem;
}

.panel-message small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.auto-scroll-floating-panel.disabled-functionality {
    background: rgba(248, 249, 250, 0.6);
}

.auto-scroll-floating-panel.disabled-functionality .panel-title {
    color: #6c757d;
}

.auto-scroll-floating-panel.disabled-functionality .btn-floating[disabled] {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.auto-scroll-floating-panel.disabled-functionality .btn-floating[disabled]:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    transform: none;
}

.auto-scroll-floating-panel.disabled-functionality .speed-select[disabled] {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   SECTION: RESPONSIVE DESIGN
   ======================================== */

/* Large screens
@media (min-width: 1600px) {
    .container-lg {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    #songSelect {
        max-width: 400px;
    }
    
    #songSelect option {
        max-width: 400px;
    }
}
*/
/* Medium screens */
@media (max-width: 991.98px) {
    #songSelect {
        min-width: 180px;
    }
    
    /* #songSelect option {
        max-width: 250px;
    } */
    

    
    .btn-transpose {
        min-width: 1.75rem;
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .transpose-buttons-floating {
        gap: 0.125rem;
    }
    
    .slider-container {
        padding: 0.25rem 0;
    }
    
    .slider-labels {
        font-size: 0.8rem;
    }
    
    .slider-value {
        font-size: 0.75rem;
        min-width: 2.5rem;
    }
    
    .chord-diagrams-horizontal {
        gap: 0.75rem;
        padding-right: 5rem;
    }
    
    .chord-controls {
        right: 0.75rem;
        padding: 0.375rem;
    }
    
    .chord-diagram-horizontal {
        min-width: 60px;
        padding: 0.1rem;
    }
    
    .chord-diagram-horizontal img {
        max-height: 80px;
    }
}

/* Small screens */
@media (max-width: 767.98px) {
    #songSelect {
        min-width: 150px;
    }
    
    #songSelect option {
        max-width: 200px;
    }
    

    
    .btn-transpose {
        min-width: 1.5rem;
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
    
    .transpose-buttons-floating {
        gap: 0.125rem;
    }
    
    .chord-controls .btn-chord-control {
        min-width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
        padding: 0.25rem;
    }
    
    .chord-controls .btn-chord-control i {
        font-size: 0.75rem;
    }
    
    .chord-controls .btn-chord-control {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
        padding: 0.375rem;
    }
    
    .chord-controls .btn-chord-control i {
        font-size: 0.8rem;
    }
    
    .slider-container {
        padding: 0.25rem 0;
    }
    
    .form-range {
        height: 1.25rem;
    }
    
    .form-range::-webkit-slider-track,
    .form-range::-moz-range-track {
        height: 0.375rem;
    }
    
    .form-range::-webkit-slider-thumb {
        height: 1rem;
        width: 1rem;
        margin-top: -0.3125rem;
    }
    
    .form-range::-moz-range-thumb {
        height: 1rem;
        width: 1rem;
    }
    
    .chord-bar-horizontal-container {
        margin-bottom: 0.5rem;
    }
    
    .chord-bar-horizontal .card-body {
        padding: 0.75rem;
    }
    
    .chord-diagrams-horizontal {
        gap: 0.25rem;
        padding: 0.25rem;
        padding-right: 4rem;
    }
    
    .chord-controls {
        right: 0.5rem;
        padding: 0.25rem;
        gap: 0.25rem;
    }
    
    .chord-diagram-horizontal {
        min-width: 60px;
        padding: 0.1rem;
    }
    
    .chord-diagram-horizontal img {
        max-height: 60px;
    }
    
    .search-results-dropdown {
        max-height: 300px;
    }
    
    .search-result-item {
        padding: 0.75rem 1rem;
    }
    
    .search-result-title {
        font-size: 0.9rem;
    }
    
    .search-result-artist {
        font-size: 0.8rem;
    }
    
    .search-result-context {
        font-size: 0.75rem;
    }
    
    .auto-scroll-floating-panel {
        bottom: 0.75rem;
        right: 0.75rem;
        min-width: 160px;
        max-width: 200px;
    }
    
    .btn-floating {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
    
    .speed-select {
        min-width: 45px;
        height: 1.5rem;
        font-size: 0.7rem;
    }
    
    .control-item {
        height: 1.5rem;
    }
    
    .floating-panel-controls {
        gap: 0.75rem;
    }
    
    .control-group {
        gap: 0.5rem;
    }
    
    .shortcuts-content {
        font-size: 0.5rem;
    }
    
    .shortcuts-content kbd {
        font-size: 0.5rem;
        padding: 0.1rem 0.2rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .chord-diagram-horizontal {
        min-width: 70px;
        padding: 0.125rem;
    }
    
    .chord-diagram-horizontal img {
        max-height: 60px;
    }
    
    .auto-scroll-floating-panel {
        bottom: 0.5rem;
        right: 0.5rem;
        min-width: 140px;
        max-width: 180px;
    }
    
    .panel-meta {
        font-size: 0.7rem;
    }
    
    .btn-floating {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.7rem;
    }
    
    .speed-select {
        min-width: 40px;
        height: 1.25rem;
        font-size: 0.65rem;
    }
    
    .control-item {
        height: 1.25rem;
    }
    
    .chord-controls .btn-chord-control {
        min-width: 1.5rem;
        height: 1.5rem;
        font-size: 0.7rem;
        padding: 0.2rem;
    }
    
    .chord-controls .btn-chord-control i {
        font-size: 0.7rem;
    }
    
    .shortcuts-content {
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.65rem;
    }
    
    .shortcuts-content span {
        margin-left: 0;
    }
}



/* ========================================
   SECTION: STICKY POSITIONING
   ======================================== */

.chord-bar-horizontal-container {
    position: relative;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.chord-bar-horizontal-container.sticky-enabled.sticky-active {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} 
/* ========================================
   SECTION: FOOTER
   ======================================== */

.footer {
    border-top: 1px solid var(--bs-border-color);
    margin-top: auto;
}

.footer h5, .footer h6 {
    color: var(--bs-body-color);
}

.footer .text-muted {
    color: var(--bs-secondary) !important;
}

.footer a.disabled {
    color: var(--bs-secondary) !important;
    pointer-events: none;
    cursor: default;
}

.footer a:not(.disabled):hover {
    color: var(--bs-primary) !important;
}

.footer .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Dark mode support for footer */
[data-bs-theme="dark"] .footer {
    border-top-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .footer .text-muted {
    color: var(--bs-secondary) !important;
}

/* ========================================
   SECTION: TAGS CLOUD
   ======================================== */

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-item {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.tag-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.tag-item.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.tag-item[data-type="genre"] {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.tag-item[data-type="genre"]:hover {
    background: #ffeaa7;
    border-color: #fdcb6e;
}

.tag-item[data-type="genre"].active {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.tag-count {
    opacity: 0.7;
    font-size: 0.75rem;
}

/* Song tags in cards */
.song-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.song-tags .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}



/* Responsive tags cloud */
@media (max-width: 768px) {
    .tags-cloud {
        gap: 0.25rem;
    }
    
    .tag-item {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

}
