:root {
    --p-color: #2563eb;
}

#editeur-pdf-root { 
    background: #1a202c; 
    min-height: 100vh; 
    padding: 20px; 
    font-family: 'Poppins', sans-serif !important;
}

.app-container { 
    background: #f7fafc; 
    max-width: 1400px; 
    margin: 0 auto; 
    border-radius: 12px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    box-shadow: 0 20px 30px rgba(0,0,0,0.5); 
    font-family: 'Poppins', sans-serif !important;
}

.app-header { 
    background: #2d3748; 
    color: white; 
    padding: 15px 25px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 4px solid var(--p-color); 
}

.white-label-tag { 
    font-size: 11px; 
    background: rgba(255,255,255,0.1); 
    padding: 5px 12px; 
    border-radius: 4px; 
    font-weight: 600; 
}

/* Layout Desktop */
.main-layout { 
    display: grid; 
    grid-template-columns: 200px 1fr 300px; 
    min-height: 600px; 
}

.sidebar { 
    background: white; 
    padding: 20px; 
    border-right: 1px solid #e2e8f0; 
}
.sidebar.right { 
    border-left: 1px solid #e2e8f0; 
    border-right: none; 
}
.sidebar.left {
    border-right: 1px solid #e2e8f0;
}

.preview-area { 
    background: #525659; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    overflow-y: auto; 
}

.preview-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-wrapper { 
    position: relative; 
    background: white; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    cursor: crosshair; 
    max-width: 100%;
}

.canvas-wrapper canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.marker-red { 
    position: absolute; 
    width: 150px; 
    height: 70px; 
    border: 3px solid var(--p-color); 
    background: rgba(37, 99, 235, 0.1); 
    transform: translate(-50%, -50%); 
    pointer-events: none;
    border-radius: 4px;
}

.btn-main { 
    background: var(--p-color); 
    color: white; 
    border: none; 
    width: 100%; 
    padding: 15px; 
    border-radius: 8px; 
    font-weight: 800; 
    cursor: pointer; 
    margin-top: 15px; 
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    font-size: 14px;
}

.btn-main:hover {
    filter: brightness(1.1);
}

.btn-main:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.sig-section {
    margin-bottom: 15px;
}

.sig-pad { 
    border: 2px solid #e2e8f0; 
    background: white; 
    width: 100%; 
    margin-top: 10px; 
    border-radius: 8px;
    touch-action: none;
    cursor: crosshair;
}

.card-label { 
    display: block; 
    font-size: 11px; 
    font-weight: 800; 
    color: #a0aec0; 
    text-transform: uppercase; 
    margin-bottom: 10px; 
}

.instruction {
    font-size: 12px;
    color: #718096;
    margin: 10px 0;
}

.pagination { 
    margin-bottom: 15px; 
    display: flex; 
    gap: 15px; 
    align-items: center; 
    font-weight: 600;
    color: white;
}

.pagination button {
    background: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.empty-msg { 
    color: #cbd5e0; 
    font-size: 18px; 
    margin-top: 100px; 
    font-weight: 800; 
}

.btn-clear { 
    font-size: 12px; 
    color: #e53e3e; 
    background: none; 
    border: none; 
    cursor: pointer; 
    margin-top: 8px; 
    font-family: 'Poppins', sans-serif; 
    font-weight: 600;
}

.file-info { 
    font-size: 13px; 
    font-weight: 500; 
    margin-bottom: 5px; 
    color: #4a5568; 
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 900px) {
    #editeur-pdf-root {
        padding: 10px;
    }
    
    .main-layout {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }
    
    .sidebar.left {
        display: none;
    }
    
    .sidebar.right {
        order: 1;
        border: none;
        padding: 15px;
    }
    
    .preview-area {
        order: 2;
        padding: 15px;
        min-height: 400px;
    }
    
    .sig-pad {
        height: 120px;
    }
    
    .btn-main {
        padding: 18px;
        font-size: 16px;
    }
    
    .app-header {
        padding: 12px 15px;
    }
    
    .white-label-tag {
        font-size: 9px;
        padding: 4px 8px;
    }
}

@media (max-width: 500px) {
    .pagination {
        gap: 10px;
        font-size: 14px;
    }
    
    .pagination button {
        padding: 6px 12px;
    }
    
    .marker-red {
        width: 120px;
        height: 50px;
    }
}
