/**
 * Styles pour la Bibliothèque d'Habillage
 */

/* Container principal */
.habillage-library {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #1a1a1a;
    border-left: 2px solid #333;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.habillage-library.open {
    right: 0;
}

/* Header */
.habillage-header {
    padding: 1rem;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.habillage-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.habillage-header .btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.habillage-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Filtres */
.habillage-filters {
    padding: 1rem;
    background: #222;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.4rem 0.8rem;
    background: #333;
    color: #999;
    border: 1px solid #444;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #444;
    color: white;
}

.filter-btn.active {
    background: #f39c12;
    color: white;
    border-color: #f39c12;
}

/* Recherche */
.habillage-search {
    padding: 0.5rem 1rem;
    background: #222;
    border-bottom: 1px solid #333;
}

.habillage-search input {
    width: 100%;
    padding: 0.5rem;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    font-size: 0.9rem;
}

.habillage-search input:focus {
    outline: none;
    border-color: #f39c12;
    background: #3a3a3a;
}

.habillage-search input::placeholder {
    color: #777;
}

/* Liste des éléments */
.habillage-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Élément d'habillage */
.habillage-item {
    display: flex;
    align-items: center;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    cursor: grab;
    transition: all 0.2s;
    position: relative;
}

.habillage-item:hover {
    background: #333;
    transform: translateX(-5px);
}

.habillage-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.habillage-item .item-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.habillage-item .item-info {
    flex: 1;
}

.habillage-item .item-title {
    font-weight: bold;
    color: white;
    margin-bottom: 0.25rem;
}

.habillage-item .item-duration {
    font-size: 0.85rem;
    color: #999;
    font-family: monospace;
}

.habillage-item .btn-add {
    width: 30px;
    height: 30px;
    border: none;
    background: #f39c12;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.habillage-item .btn-add:hover {
    background: #e67e22;
    transform: scale(1.1);
}

/* Footer */
.habillage-footer {
    padding: 1rem;
    background: #222;
    border-top: 1px solid #333;
    text-align: center;
    color: #777;
    font-size: 0.85rem;
}

/* Scrollbar personnalisée */
.habillage-items::-webkit-scrollbar {
    width: 8px;
}

.habillage-items::-webkit-scrollbar-track {
    background: #111;
}

.habillage-items::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.habillage-items::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Zone de drop dans le conducteur */
.rundown-table.drag-over {
    background: rgba(243, 156, 18, 0.1);
}

.rundown-table tr.drag-target {
    background: rgba(243, 156, 18, 0.2);
    border: 2px dashed #f39c12;
}

/* Animation de glissement */
@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .habillage-library {
        width: 100%;
        right: -100%;
    }
}