/* Conteneur widgets */
.sp-widgets-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    overflow: hidden;
}

/* Widget individuel */
.sp-widget {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.sp-widget:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.sp-widget-header {
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.sp-widget-title {
    font-size: 14px;
    font-weight: 600;
}

.sp-widget-actions {
    display: flex;
    gap: 5px;
}

.sp-widget-actions button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sp-widget-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sp-widget-body {
    padding: 15px;
    height: calc(100% - 52px);
    overflow: auto;
}

/* Bibliothèque */
.sp-widget-library-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.sp-library-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sp-library-categories {
    padding: 15px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.sp-cat-tab {
    padding: 10px 20px;
    border-radius: 8px;
    background: white;
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sp-cat-tab.active {
    background: #667eea;
    color: white;
}

.sp-library-widgets {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.sp-library-widget-card {
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sp-library-widget-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.sp-library-widget-card i {
    font-size: 40px;
    color: #667eea;
    margin-bottom: 10px;
}

.sp-library-widget-card h4 {
    font-size: 16px;
    margin: 10px 0;
}

.sp-library-widget-card p {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}

.sp-add-this-widget {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sp-add-this-widget:hover {
    background: #764ba2;
}