/* ============================================
   WRAPPER & HEADER
============================================ */
.ld-song-library-wrapper {
    max-width: 1400px;
    margin: 20px auto;
    padding: 32px 40px;
    background: #f6f3ec;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}



.ld-song-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.ld-song-library-title {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 28px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}

.ld-song-library-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================
   INPUTS & BUTTONS
============================================ */
.ld-input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d9d3c9;
    background: #fff;
    min-width: 180px;
    font-size: 14px;
}

.ld-textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d9d3c9;
    background: #fff;
    font-size: 14px;
}

.ld-button {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #1a1a1a;
    background: #1a1a1a;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ld-button-secondary {
    background: #f6f3ec;
    color: #1a1a1a;
}

.ld-button-primary {
    background: #1a1a1a;
    color: #fff;
}

.ld-button-danger {
    border-color: #c0392b;
    background: #c0392b;
}

.ld-button:hover {
    opacity: 0.88;
}

.ld-link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #1a1a1a;
    text-decoration: underline;
    font-size: 13px;
    cursor: pointer;
}

/* ============================================
   TABLE
============================================ */
.ld-song-library-table-wrapper {
    width: calc(100vw - 40px); /* pleine largeur propre */
    margin-left: 50%;
    transform: translateX(-50%);
    max-width: 1600px;
    overflow-x: auto;
}

.ld-song-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.ld-song-table thead {
    background: #f0ebe2;
}

.ld-song-table th,
.ld-song-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid #eee3d3;
    text-align: left;
}

.ld-song-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d6456;
}

.ld-song-table tbody tr:last-child td {
    border-bottom: none;
}

/* Colonne NOTES : extrait + tooltip */
.ld-col-notes {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================
   MODALS
============================================ */
.ld-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.ld-modal-backdrop[hidden] {
    display: none !important;
}

.ld-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}
.ld-modal[hidden] {
    display: none !important;
}

.ld-modal form,
.ld-modal .ld-modal-form,
.ld-modal .ld-modal-import-form {
    pointer-events: auto;
    background: #fefbf6;
    border-radius: 14px;
    padding: 22px 24px 18px;
    width: min(520px, 92vw);
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

.ld-modal-title {
    margin: 0 0 14px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 22px;
    letter-spacing: 0.04em;
}

.ld-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 13px;
}

.ld-field span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7b7467;
}

.ld-field-group {
    display: flex;
    gap: 10px;
}
.ld-field-group .ld-field {
    flex: 1;
}

.ld-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 640px) {
    .ld-song-library-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ld-song-library-controls {
        width: 100%;
    }
    .ld-input.ld-search {
        flex: 1;
    }
    .ld-field-group {
        flex-direction: column;
    }
}

.ld-multi-actions {
    margin-bottom: 12px;
    padding: 10px;
    background: #f4eae2;
    border: 1px solid #dccfbe;
    border-radius: 6px;
    display: flex;
    justify-content: flex-end;
}

/* Tri : petit indicateur sur les colonnes triables */
.ld-sortable {
    cursor: pointer;
    position: relative;
}

.ld-sortable .ld-sort-indicator {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.7;
}

/*langue*/  
.ld-lang-switch {
    position: relative;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    width: 180px;
    background: #eee5d6;
    border-radius: 999px;
    padding: 4px;
    margin-top: 4px;
    cursor: pointer;
    user-select: none;
}

.ld-lang-switch .lang-option {
    z-index: 2;
    border: none;
    background: none;
    font-size: 13px;
    padding: 6px 0;
    cursor: pointer;
    color: #5a5448;
}

.ld-lang-switch .lang-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: #1a1a1a;
    border-radius: 999px;
    transition: transform 0.2s ease;
    z-index: 1;
}

.ld-lang-switch.active-english .lang-slider {
    transform: translateX(100%);
}

.ld-lang-switch .lang-option.active {
    color: #fff;
    font-weight: 600;
}

/* ===============================
   • Boutons d’action Les Darons
   =============================== */

.ld-col-actions {
    text-align: center;
    white-space: nowrap;
}

/* Base button style */
.ld-action-btn {
    background: #f8f7f3; /* ivoire */
    border: 1px solid #ddd;
    color: #333;
    font-size: 14px;
    padding: 4px 8px;
    margin: 0 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .18s ease-out;
}

/* Hover = gris souris chic */
.ld-action-btn:hover {
    background: #e8e7e2;
    border-color: #bbb;
}

/* Effet “piano gloss” */
.ld-action-btn:active {
    transform: scale(0.92);
    background: #d6d5cf;
}

/* Edit = noir fin */
.ld-edit-one {
    color: #111;
}

/* Delete = rouge bordeaux subtil */
.ld-delete-one {
    color: #7a1a1a;
}

/* ==========================================================
   🌟 PREMIUM TOOLTIP STYLE
========================================================== */
.ld-premium-tooltip {
    max-width: 320px;
    background: #fdfdfb; /* ivoire léger */
    color: #111;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1.4;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    z-index: 999999;
    opacity: 0;
    backdrop-filter: blur(2px);
}

.ld-tooltip {
    position: absolute;
    max-width: 340px;
    padding: 12px 15px;
    background: rgba(30,30,30,0.97);
    color: #f2f2f2;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    animation: fadeInTooltip 0.15s ease-out;
}

.ld-tooltip strong {
    color: #ffffff;
    font-weight: 600;
}
@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
