@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

.document-processor {
    font-family: "Roboto", Arial, Helvetica, sans-serif;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    width: 450px;
    position: fixed;
    bottom: 10px;
    right: 20px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 60px; /* PAR DÉFAUT COLLAPSED */
    overflow: hidden;
}

.document-processor.expanded {
    max-height: 420px; /* OUVERT AVEC LA CLASSE EXPANDED */
}

.document-processor.no-transition {
    transition: none !important;
}

.header {
    background: #0064c8;
    color: white;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* cursor: move;
    user-select: none; */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.btn-play {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px; 
    padding: 6px 10px;
    padding-right: 20px !important;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px; 
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

#playStopIcon {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-play svg {
    flex-shrink: 0; 
}

.btn-play .btn-text {
    white-space: nowrap;
    margin-top: 2px;
}

.btn-play:hover {
    background: rgba(255, 255, 255, 0.3);
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    opacity: 0.9;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stat-icon.pending {
    background: #ffc107;
}

.stat-icon.completed {
    background: #28a745;
}

.btn-icon {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 18px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.document-list {
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
}

.document-item {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
}

.document-item:hover {
    background: #f1f3f4;
}

.document-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.doc-status-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-number {
    font-weight: bold;
    color: #0064c8;
    font-size: 14px;
}

.doc-name {
    color: #333;
    font-size: 13px;
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-container {
    margin-top: 6px;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: #0064c8;
    border-radius: 10px;
    transition: width 0.8s ease; 
}

.progress-text {
    font-size: 11px;
    color: #666;
    text-align: right;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0064c8;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    animation: spin 1s linear infinite;
}

.icon-done {
    color: #28a745;
}

.icon-error {
    color: #dc3545;
}

.icon-waiting {
    color: #6c757d;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Responsive */
@media (max-width: 500px) {
    .document-processor {
        width: 100%;
        margin: 0 10px;
    }
    
    .completion-stats {
        flex-direction: column;
        gap: 12px;
    }
}