/* Styles spécifiques pour le formulaire de gestion des Songbooks */

.sb-form-container {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-top: 30px;
    margin-bottom: 50px;
}

.sb-header-title {
    color: #2b1d1a;
    font-weight: bold;
    border-bottom: 2px solid #D2B48C;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.sb-well-custom {
    background: #fdfaf5;
    border: 1px solid #D2B48C;
    border-radius: 12px;
    padding: 25px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.sb-well-custom .control-label {
    color: #8B4513;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.5px;
    margin-top: 5px;
}

.sb-well-custom .form-control {
    border: 1px solid #D2B48C;
    border-radius: 8px;
    padding: 10px 15px;
    height: auto;
    font-size: 15px;
    color: #2b1d1a;
    transition: all 0.2s;
}

.sb-well-custom .form-control:focus {
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
    outline: none;
}

.sb-btn-save {
    background: #8B4513;
    border: none;
    font-weight: bold;
    padding: 12px 40px;
    border-radius: 30px;
    letter-spacing: 1px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.sb-btn-save:hover {
    background: #2b1d1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.sb-btn-save i {
    margin-right: 8px;
}

.sb-section-title {
    color: #2b1d1a;
    margin-top: 40px;
}

/* --- LISTE SORTABLE ET LIST-GROUP (Cartouches robustes) --- */

#sortable, .list-group {
    padding: 0;
    margin: 25px 0;
    list-style: none;
}

#sortable .sb-sortable-item, .sb-list-item {
    background: white !important;
    padding: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 15px !important;
    margin-bottom: 15px !important;
    
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    
    min-height: 90px !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.sb-sortable-item { cursor: move; }

/* 1. Zone de gauche (Poignée / Icône) */
#sortable .sb-handle-icon, .sb-list-item .sb-handle-icon {
    width: 80px !important;
    min-width: 80px !important;
    background-color: #f9f9f9 !important;
    border-right: 1px solid #eee !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #D2B48C !important;
    font-size: 28px !important;
    flex-shrink: 0 !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

/* 2. Zone centrale (Titre / Contenu) */
#sortable .sb-item-content, .sb-list-item .sb-item-content {
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 30px !important;
    font-size: 22px !important;
    color: #2b1d1a !important;
    min-width: 0 !important;
    background: white !important;
    position: static !important;
    float: none !important;
}

#sortable .sb-item-content strong, .sb-list-item .sb-item-content strong {
    color: #8B4513 !important;
    margin-right: 20px !important;
    font-size: 28px !important;
    font-family: serif !important;
    flex-shrink: 0 !important;
}

/* 3. Zone de droite (Bouton supprimer) */
#sortable .sb-remove-btn, .sb-list-item .sb-remove-btn {
    width: 100px !important;
    min-width: 100px !important;
    background-color: #fff5f5 !important;
    border-left: 1px solid #fee2e2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #d9534f !important;
    font-size: 35px !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
    position: static !important;
    float: none !important;
}

#sortable .sb-remove-btn:hover, .sb-list-item .sb-remove-btn:hover {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    text-decoration: none !important;
}

/* --- RECHERCHE ET AJOUT --- */

.sb-add-box {
    margin-top: 30px;
    padding: 25px;
    border: 2px dashed #D2B48C;
    border-radius: 15px;
    background: white;
}

.sb-add-title {
    margin-top: 0;
    color: #2b1d1a;
    font-weight: bold;
}

.sb-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 10px 10px;
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    max-height: 250px;
    overflow-y: auto;
}

.sb-pdf-selection {
    margin-top: 20px;
    display: none;
    padding: 15px;
    background: #fcfaf2;
    border-radius: 10px;
    border: 1px solid #D2B48C;
}

.sb-footer-actions {
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.sb-btn-generate {
    border-radius: 30px;
    padding: 15px 40px;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.sb-btn-create {
    background-color: #2e7d32;
    color: white;
    font-weight: 900;
    border-radius: 30px;
    padding: 12px 30px;
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.2);
}

/* Fallback & Old styles neutralisation */
.sb-form-container fieldset { border: none; padding: 0; margin: 0; }
.sb-form-container legend { color: #2b1d1a; border: none; margin-bottom: 10px; font-weight: bold; }
.sb-form-container label { float: none; width: auto; display: inline-block; margin-top: 0; }
.sb-form-container .form-horizontal .control-label { float: left; width: 16.66666667%; text-align: right; padding-top: 7px; margin-bottom: 0; }
.sb-form-container .ui-state-default { background: white; color: #2b1d1a; border: 1px solid #ddd; }
.sb-form-container .list-group-item-action:hover { background-color: #f5f5f5; }

.chanson-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.chanson-item:hover {
    transform: translateX(10px);
    border-color: #D2B48C;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.chanson-num {
    font-family: serif;
    font-style: italic;
    color: #D2B48C;
    font-size: 20px;
    margin-right: 20px;
    width: 30px;
    display: inline-block;
}

.btn-sb-action {
    border-radius: 20px;
    padding: 8px 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
